diff --git a/nextcloud-del.py b/nextcloud-del.py new file mode 100644 index 0000000..1d1538a --- /dev/null +++ b/nextcloud-del.py @@ -0,0 +1,32 @@ +import pyautogui +import keyboard +from time import sleep +#needs opencv-python, keyboard, pyautogui (installed by pip) + +delete = "d" +skip = "s" +up = "a" + +while True: + if keyboard.read_key() == delete: + x, y = pyautogui.position() + # locatel and press 3 dots + x1, y2 = pyautogui.locateCenterOnScreen("dots.png") + pyautogui.moveTo(x1, y2) + pyautogui.click() + # locate and press bin + sleep(0.2) + x2, y2 = pyautogui.locateCenterOnScreen("bin.png", confidence=0.75) + 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 + 90) + + if keyboard.read_key() == up: + x, y = pyautogui.position() + pyautogui.moveTo(x, 400) +