import pyautogui import keyboard from time import sleep #needs opencv-python, keyboard, pyautogui (installed by pip) delete = "d" #skip = "s" #up = "a" pyautogui.moveTo(250, 250) while True: if keyboard.read_key() == delete: x, y = pyautogui.position() pyautogui.click() # locatel and edit sleep(0.5) x1, y2 = pyautogui.locateCenterOnScreen("edit.png") pyautogui.moveTo(x1, y2) pyautogui.click() # locate and press del sleep(0.5) x2, y2 = pyautogui.locateCenterOnScreen("myCont.png", confidence=0.7) pyautogui.moveTo(x2, y2) pyautogui.click() pyautogui.press("enter") # save sleep(0.5) x3, y3 = pyautogui.locateCenterOnScreen("save.png", confidence=0.9) pyautogui.moveTo(x3, y3) pyautogui.click() # move back pyautogui.moveTo(x, y) # if keyboard.read_key() == skip: # x, y = pyautogui.position() # pyautogui.moveTo(x, y + 50) # # if keyboard.read_key() == up: # x, y = pyautogui.position() # pyautogui.moveTo(x, 400) #