Created
March 24, 2022 11:00
-
-
Save BluumDK/b8ec10f953c24ebb0f08cc2ca9f77615 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| import keyboard | |
| import pyautogui | |
| import win32api | |
| import win32con | |
| def click(x, y): | |
| win32api.SetCursorPos((x, y)) | |
| win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN, 0, 0) | |
| time.sleep(0.0) | |
| win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP, 0, 0) | |
| while not keyboard.is_pressed('q'): | |
| if pyautogui.pixelMatchesColor(1120, 540, (1, 1, 1)): | |
| click(1120, 540) | |
| if pyautogui.pixelMatchesColor(1020, 540, (1, 1, 1)): | |
| click(1020, 540) | |
| if pyautogui.pixelMatchesColor(880, 540, (1, 1, 1)): | |
| click(880, 540) | |
| if pyautogui.pixelMatchesColor(800, 540, (1, 1, 1)): | |
| click(790, 540) | |
| if pyautogui.pixelMatchesColor(1120, 540, (0, 0, 0)): | |
| click(1120, 540) | |
| if pyautogui.pixelMatchesColor(1020, 540, (0, 0, 0)): | |
| click(1020, 540) | |
| if pyautogui.pixelMatchesColor(880, 540, (0, 0, 0)): | |
| click(880, 540) | |
| if pyautogui.pixelMatchesColor(800, 540, (0, 0, 0)): | |
| click(790, 540) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment