base working
This commit is contained in:
parent
0727469872
commit
85881bca4d
BIN
bin.png
BIN
bin.png
Binary file not shown.
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 2.4 KiB |
29
yt-del.py
29
yt-del.py
@ -1,13 +1,22 @@
|
|||||||
import pyautogui
|
import pyautogui
|
||||||
import time
|
import keyboard
|
||||||
|
from time import sleep
|
||||||
|
#needs opencv-python, keyboard, pyautogui (installed by pip)
|
||||||
|
|
||||||
# locatel and press 3 dots
|
delete = "d"
|
||||||
x1, y2 = pyautogui.locateCenterOnScreen("dots.png")
|
skip = "s"
|
||||||
pyautogui.moveTo(x1, y2)
|
|
||||||
pyautogui.click()
|
|
||||||
|
|
||||||
# locate and press bin
|
while True:
|
||||||
sleep(2)
|
if keyboard.read_key() == delete:
|
||||||
x2, y2 = pyautogui.locateCenterOnScreen("bin.png")
|
x, y = pyautogui.position()
|
||||||
pyautogui.moveTo(x2, y2)
|
# locatel and press 3 dots
|
||||||
pyautogui.click()
|
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)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user