Skip to content

Instantly share code, notes, and snippets.

@jonsatrom
Created November 9, 2014 19:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonsatrom/e9c98ec3e7d2e282f145 to your computer and use it in GitHub Desktop.
Save jonsatrom/e9c98ec3e7d2e282f145 to your computer and use it in GitHub Desktop.
Fun way to open Calculator
tell application "Finder"
activate
open application file "Calculator.app" of folder "Applications" of startup disk
end tell
tell application "System Events"
repeat
set rand1 to (random number from 10 to 1500) as string
set rand2 to (random number from 10 to 1500) as string
# set rand3 to (random number from 0.5 to 1.0E-3)
set position of window of application process "Calculator" to {rand1, rand2}
# delay {rand3}
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment