Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pyautogui
- import keyboard
- w,h = pyautogui.size()
- w1 = w//2
- w=w//2
- h=h//2
- def magic():
- global w,h
- while not keyboard.is_pressed("f"):
- if keyboard.is_pressed("LEFT"):
- w = w - 5
- pyautogui.moveTo(w,h)
- print("width: " + str(w-w1))
- while keyboard.is_pressed("LEFT"): pass
- if keyboard.is_pressed("RIGHT"):
- w = w + 5
- print("width: " + str(w-w1))
- pyautogui.moveTo(w,h)
- while keyboard.is_pressed("RIGHT"): pass
- magic()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement