nextcloud del
This commit is contained in:
godot 2023-12-23 00:23:07 +01:00
parent 99923c1ac8
commit db2f9f5706

32
nextcloud-del.py Normal file
View File

@ -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)