Skip to content

Instantly share code, notes, and snippets.

@Nikolaj-K
Created May 1, 2022 19:37
Show Gist options
  • Save Nikolaj-K/24ee9758b93ab1941cee27a99e680715 to your computer and use it in GitHub Desktop.
Save Nikolaj-K/24ee9758b93ab1941cee27a99e680715 to your computer and use it in GitHub Desktop.
import time
import pyautogui # pip install pyautogui
# Warning: This script will control your cursor for its runtime
ID_WHERE_YOU_ARE_NOW = 13665
ID_TARGET = 13800
BUTTON_POSITION = (1400, 500) # Depends on your screen
SLEEP_TIME = 0.1
DISTANCE = ID_TARGET - ID_WHERE_YOU_ARE_NOW + 1
if DISTANCE > 500:
print("Be gentle. Please find a deed that's less than 500 deeds away.")
else:
for idx in range(DISTANCE):
time.sleep(SLEEP_TIME)
print(f"#{idx} of {DISTANCE}: ({100 * idx / DISTANCE} %)")
pyautogui.click(*BUTTON_POSITION)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment