Skip to content

Instantly share code, notes, and snippets.

@ethanmick
Last active August 29, 2015 13:57
Show Gist options
  • Save ethanmick/9469272 to your computer and use it in GitHub Desktop.
Save ethanmick/9469272 to your computer and use it in GitHub Desktop.
A script to play 2048 on Chrome.
activate application "Google Chrome"
delay 1.0 -- time to release modifier keys if the script is run with a keyboard shortcut
tell application "System Events"
repeat 100 times
set rand to (random number from 123 to 126)
key code rand
delay 0.2
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment