-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautoPlay.py
More file actions
25 lines (22 loc) · 806 Bytes
/
autoPlay.py
File metadata and controls
25 lines (22 loc) · 806 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
import pyautogui
import time
import win32api
import win32con
import keyboard
def click(x,y):
win32api.SetCursorPos((x,y))
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,0,0)
time.sleep(0.05)
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,0,0)
print("go")
while keyboard.is_pressed("q") == False:
# if pyautogui.pixel(465,450)[0]==0: click(465,450)
# if pyautogui.pixel(555,450)[0]==0: click(555,450)
# if pyautogui.pixel(658,450)[0]==0: click(658,450)
# if pyautogui.pixel(748,450)[0]==0: click(748,450)
if pyautogui.pixel(740,1010)[0]==0: click(740,1010)
if pyautogui.pixel(880,1010)[0]==0: click(880,1010)
if pyautogui.pixel(1030,1010)[0]==0: click(1030,1010)
if pyautogui.pixel(1155,1010)[0]==0: click(1155,1010)
#520 y
#0.1 sleep