I’m making a script to generate a 25 digit string.
This is what i came to:
on randomString(aLength)
set randomLetters to {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0"}
set aString to ""
repeat aLength times
set aString to aString & some item of randomLetters
end repeat
return aString
end randomString
display dialog randomString(25) buttons {"Copy to Clipboard", "Cancel"}
What i want, is that when you press the “Copy to Clipboard” button, you get the string generated copied to clipboard.
Any thoughts?