skip working

This commit is contained in:
godot 2023-12-06 00:09:16 +01:00
parent 85881bca4d
commit 181564d5c3

View File

@ -6,6 +6,7 @@ from time import sleep
delete = "d"
skip = "s"
while True:
if keyboard.read_key() == delete:
x, y = pyautogui.position()
@ -14,9 +15,13 @@ while True:
pyautogui.moveTo(x1, y2)
pyautogui.click()
# locate and press bin
sleep(0.1)
sleep(0.15)
x2, y2 = pyautogui.locateCenterOnScreen("bin.png", confidence=0.8)
pyautogui.moveTo(x2, y2)
pyautogui.click()
# move back
pyautogui.moveTo(x, y)
if keyboard.read_key() == skip:
x, y = pyautogui.position()
pyautogui.moveTo(x, y + 100)