Last active
April 30, 2022 12:00
-
-
Save CCXXXI/9eddc6b45632b16b356bd29a1e34e283 to your computer and use it in GitHub Desktop.
Press "1" to start. Press "0" to stop.
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
import keyboard | |
import pydirectinput as pyautogui | |
pyautogui.PAUSE = 0 | |
def f(): | |
while not keyboard.is_pressed("0"): | |
pyautogui.press("up") | |
pyautogui.press("enter") | |
if __name__ == "__main__": | |
keyboard.add_hotkey("1", f) | |
keyboard.wait() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment