Skip to content

Instantly share code, notes, and snippets.

@KarimJedda
Created March 21, 2017 17:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KarimJedda/6323cf43f8258cddbb44b28d5c7f11a7 to your computer and use it in GitHub Desktop.
Save KarimJedda/6323cf43f8258cddbb44b28d5c7f11a7 to your computer and use it in GitHub Desktop.
No sleep mode for mac
import pyautogui
import time
import random
screenWidth, screenHeight = pyautogui.size()
currentMouseX, currentMouseY = pyautogui.position()
while True:
pyautogui.moveTo(random.randint(1, 1000), random.randint(1, 500))
time.sleep(20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment