Untitled
unknown
plain_text
5 days ago
865 B
2
Indexable
Never
import pyautogui import keyboard import win32api import win32con from time import sleep pyautogui.click(1025,370,duration=1) def click(x,y): win32api.SetCursorPos((x,y)) win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,0,0) sleep(0.06) win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,0,0) # Loop até que a tecla '1' seja pressionada while not keyboard.is_pressed('1'): # Se a cor na posição for preta (0, 0, 0), clique nas coordenadas correspondentes if pyautogui.pixelMatchesColor(958, 343, (0, 0, 0)): click(958, 343) if pyautogui.pixelMatchesColor(1014, 342, (0, 0, 0)): click(1014, 342) # Coordenada Y corrigida if pyautogui.pixelMatchesColor(1068, 340, (0, 0, 0)): click(1068, 340) if pyautogui.pixelMatchesColor(1133, 342, (0, 0, 0)): click(1133, 342)
Leave a Comment