Last active
February 26, 2025 23:21
-
-
Save atroia/a30e0c41ebf35ab3b9a2e27be54983bf to your computer and use it in GitHub Desktop.
10 digit code generator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set theButton to button returned of (display dialog "10 digit code: " & randomNum() buttons {"Refresh", "Cancel", "OK"} with title ("10 Digit Code Generator")) | |
if theButton is "Refresh" then my repeatNum() | |
on randomNum() | |
set x to random number from 10000 to 99999 | |
set y to random number from 10000 to 99999 | |
set returnNum to (x & "-" & y) as text | |
end randomNum | |
on repeatNum() | |
set theButton to button returned of (display dialog "10 digit code: " & randomNum() buttons {"Refresh", "Cancel", "OK"} with title ("10 Digit Code Generator")) | |
if theButton is "Refresh" then my repeatNum() | |
end repeatNum |
added title to display dialog
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Initial Commit