Skip to content

Instantly share code, notes, and snippets.

@ao
Created August 24, 2018 11:46
Show Gist options
  • Save ao/8a581b0aa4b0ad7e0b7ea865fa03a091 to your computer and use it in GitHub Desktop.
Save ao/8a581b0aa4b0ad7e0b7ea865fa03a091 to your computer and use it in GitHub Desktop.
Automatic mouse mover (in python)
from pynput.mouse import Button, Controller
import time
mouse = Controller()
mouse.position = (0, 0)
mouse.move(50, 50)
for i in range(1000):
mouse.move(75, 75)
time.sleep(1)
mouse.position = (50, 50)
time.sleep(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment