mirror of
https://github.com/FranP-code/classify_saved_videos_yt.git
synced 2025-10-13 00:32:25 +00:00
little changes on script
This commit is contained in:
17
script.py
17
script.py
@@ -1,6 +1,7 @@
|
|||||||
import pyautogui as pgui
|
import pyautogui as pgui
|
||||||
import time
|
import time
|
||||||
from pynput import keyboard as kb
|
from pynput import keyboard as kb
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
quit = False
|
quit = False
|
||||||
@@ -25,14 +26,14 @@ browser_img = 'brave.png'
|
|||||||
|
|
||||||
browser_loc = pgui.locateCenterOnScreen(f'img/{browser_img}', confidence=0.8)
|
browser_loc = pgui.locateCenterOnScreen(f'img/{browser_img}', confidence=0.8)
|
||||||
|
|
||||||
pgui.moveTo(browser_loc, duration=0.2)
|
if browser_loc:
|
||||||
time.sleep(0.2)
|
pgui.moveTo(browser_loc, duration=0.2)
|
||||||
pgui.click()
|
pgui.click()
|
||||||
|
# Change the time depending on how long it takes to open your browser
|
||||||
# Change the time depending on how long it takes to open your browser
|
time.sleep(2)
|
||||||
time.sleep(2)
|
else:
|
||||||
|
print("Browser icon not found.")
|
||||||
|
sys.exit('closing script')
|
||||||
|
|
||||||
pgui.hotkey('ctrl', 't')
|
pgui.hotkey('ctrl', 't')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user