Skip to content

Instantly share code, notes, and snippets.

@bahostetterlewis
Last active December 15, 2015 06:48
Show Gist options
  • Save bahostetterlewis/5218484 to your computer and use it in GitHub Desktop.
Save bahostetterlewis/5218484 to your computer and use it in GitHub Desktop.
import win32api, win32con, time
def click(x, y):
win32api.SetCursor((X,y))
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,x,y,0,0)
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,x,y,0,0)
def clean():
click(1050, 200)
click(1050, 220)
def run():
while True:
clean()
time.sleep(3)
if name == "__main__":
run()
@jabbalaci
Copy link

Look at the autopy module too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment