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