Created
March 5, 2015 17:39
-
-
Save seaders/574084682c5875dda698 to your computer and use it in GitHub Desktop.
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
| #!/usr/local/bin/python | |
| import time, sys, wrapper | |
| target = int(sys.argv[1]) | |
| curr = int(sys.argv[2]) | |
| adb_loc = '/Developer/sdks/android/platform-tools/adb' | |
| adb = wrapper.CommandWrapper(adb_loc) | |
| def tap(msg, x, y, delay): | |
| time.sleep(delay) | |
| print msg | |
| adb.shell('input', 'tap', x, y) | |
| try: | |
| delay = 0 | |
| while curr < target: | |
| tap('tapping top entry', 1485, 295, delay) | |
| tap('pausing', 65, 65, 6) | |
| tap('back to menu', 835, 995, 1) | |
| curr += 1 | |
| print '{} times, only {} more to go...'.format(curr, target - curr) | |
| delay = 3 | |
| except KeyboardInterrupt: | |
| pass | |
| # |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment