Created
August 8, 2012 20:35
-
-
Save ckwang8128/3298447 to your computer and use it in GitHub Desktop.
AppleScript to play Google's Basketball Doodle. Start Chrome, then run this, move to Chrome, press the play button on the doodle. Watch it go!
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
| tell application "Google Chrome" | |
| tell window 1 | |
| set newTab to make new tab with properties {URL:"https://www.google.com/doodles/basketball-2012"} | |
| end tell | |
| delay 5 | |
| beep | |
| delay 0.2 | |
| tell application "System Events" | |
| set x to 1 | |
| tell process "Google Chrome" | |
| repeat 12 times | |
| log x | |
| set x to x + 1 | |
| key down space | |
| delay 0.15 | |
| key up space | |
| end repeat | |
| repeat 17 times | |
| log x | |
| set x to x + 1 | |
| key down space | |
| delay 0.27 | |
| key up space | |
| end repeat | |
| repeat 13 times | |
| log x | |
| set x to x + 1 | |
| key down space | |
| delay 0.7 | |
| key up space | |
| end repeat | |
| repeat 20 times | |
| log x | |
| set x to x + 1 | |
| key down space | |
| delay 0.8 | |
| key up space | |
| end repeat | |
| end tell | |
| end tell | |
| end tell | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment