Created
May 31, 2022 19:56
-
-
Save AxDSan/2a25d8c65aac675469d33cc32c9b4435 to your computer and use it in GitHub Desktop.
A small python script to steadily move the mouse when seeking through the scrub bar in YouTube
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! python3 | |
import pyautogui, keyboard, sys | |
print('Press Ctrl-C to quit.') | |
try: | |
while True: | |
x, y = pyautogui.position() | |
# if active window contains "youtube" | |
if keyboard.is_pressed('shift'): | |
# keep mouse at the same position | |
if "youtube" in pyautogui.getActiveWindowTitle().lower(): | |
pyautogui.moveTo(x,865) | |
except KeyboardInterrupt: | |
print('\n') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment