From 99923c1ac8d2ad32cbaccbb6227c410c750568bb Mon Sep 17 00:00:00 2001 From: godot Date: Wed, 6 Dec 2023 01:03:47 +0100 Subject: [PATCH] add reset cursor button --- yt-del.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/yt-del.py b/yt-del.py index b2ba9f5..1d1538a 100644 --- a/yt-del.py +++ b/yt-del.py @@ -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) \ No newline at end of file + pyautogui.moveTo(x, y + 90) + + if keyboard.read_key() == up: + x, y = pyautogui.position() + pyautogui.moveTo(x, 400) +