Skip to content

Instantly share code, notes, and snippets.

@jabbalaci
Created August 10, 2012 22:52
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 jabbalaci/3318755 to your computer and use it in GitHub Desktop.
Save jabbalaci/3318755 to your computer and use it in GitHub Desktop.
Play Hurdles 2012 (google doodle)
#!/usr/bin/env python
"""
Play http://www.google.com/doodles/hurdles-2012 .
Code based on https://gist.github.com/3287367 .
"""
import time
from autopy import key
def play():
print '# switch to Hurdles 2012 in your browser (you have 3 seconds)'
time.sleep(3)
s = time.time()
while time.time() - s < 15:
for _ in range(15):
key.tap(key.K_LEFT)
key.tap(key.K_RIGHT)
key.tap(' ')
time.sleep(0.1)
#############################################################################
if __name__ == "__main__":
play()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment