base working

This commit is contained in:
godot 2023-12-05 23:57:31 +01:00
parent 0727469872
commit 85881bca4d
2 changed files with 19 additions and 10 deletions

BIN
bin.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -1,13 +1,22 @@
import pyautogui
import time
import keyboard
from time import sleep
#needs opencv-python, keyboard, pyautogui (installed by pip)
# locatel and press 3 dots
x1, y2 = pyautogui.locateCenterOnScreen("dots.png")
pyautogui.moveTo(x1, y2)
pyautogui.click()
delete = "d"
skip = "s"
# locate and press bin
sleep(2)
x2, y2 = pyautogui.locateCenterOnScreen("bin.png")
pyautogui.moveTo(x2, y2)
pyautogui.click()
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.1)
x2, y2 = pyautogui.locateCenterOnScreen("bin.png", confidence=0.8)
pyautogui.moveTo(x2, y2)
pyautogui.click()
# move back
pyautogui.moveTo(x, y)