-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdrawer.py
36 lines (32 loc) · 927 Bytes
/
drawer.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from path import Path
import pyautogui as gui
import time
while True:
# wait for file to appear
d = Path('/Users/rtaori/Dropbox/CalHacks2016/processed')
while len(d.files()) == 0:
print('num files:' + str(len(d.files())))
time.sleep(3)
img = d.files()[0]
gui.click(1147, 589) # set home
time.sleep(1)
gui.click(70, 52) # hit file
time.sleep(1)
gui.click(101, 81) # hit open file
time.sleep(1)
gui.click(721, 278) # hit date modified
time.sleep(1)
gui.click(721, 278) # hit date modified
time.sleep(1)
gui.click(478, 297) # hit first image
time.sleep(1)
gui.click(876, 594) # hit open
time.sleep(25)
gui.click(191, 53) # hit draw
time.sleep(1)
gui.click(200, 81) # hit start
time.sleep(1)
gui.click(785, 463) # hit ok
time.sleep(1)
# remove the image otherwise next iterations will mess up
img.remove()