add reset cursor button

This commit is contained in:
godot 2023-12-06 01:03:47 +01:00
parent 181564d5c3
commit 99923c1ac8

View File

@ -5,7 +5,7 @@ from time import sleep
delete = "d"
skip = "s"
up = "a"
while True:
if keyboard.read_key() == delete:
@ -15,8 +15,8 @@ while True:
pyautogui.moveTo(x1, y2)
pyautogui.click()
# locate and press bin
sleep(0.15)
x2, y2 = pyautogui.locateCenterOnScreen("bin.png", confidence=0.8)
sleep(0.2)
x2, y2 = pyautogui.locateCenterOnScreen("bin.png", confidence=0.75)
pyautogui.moveTo(x2, y2)
pyautogui.click()
# move back
@ -24,4 +24,9 @@ while True:
if keyboard.read_key() == skip:
x, y = pyautogui.position()
pyautogui.moveTo(x, y + 100)
pyautogui.moveTo(x, y + 90)
if keyboard.read_key() == up:
x, y = pyautogui.position()
pyautogui.moveTo(x, 400)