-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfourth.py
More file actions
33 lines (24 loc) · 737 Bytes
/
fourth.py
File metadata and controls
33 lines (24 loc) · 737 Bytes
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
import time
import pyautogui
from PIL import ImageGrab
def imageGrab4():
fourth = (803, 275, 804, 865)
image4 = ImageGrab.grab(bbox=fourth)
width, height = image4.size
for x in range(width):
for y in reversed(range(height)):
if image4.getpixel((x, y)) == (17, 17, 17):
actual_x = x + 802
actual_y = y + 274
if actual_y != None:
return actual_x, actual_y
else:
break
start = time.time()
while (time.time() - start) < 100:
firsty = imageGrab4()
val4 = 0
if firsty != None:
val4 = firsty
pyautogui.click(val4)
print(val4)