Skip to content

Instantly share code, notes, and snippets.

@youminkim
Created July 18, 2012 05:49
Show Gist options
  • Select an option

  • Save youminkim/3134458 to your computer and use it in GitHub Desktop.

Select an option

Save youminkim/3134458 to your computer and use it in GitHub Desktop.
auto_click
import win32api, win32con, time
def click(x,y):
win32api.SetCursorPos((x,y))
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN, x, y, 0, 0)
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP, x, y, 0, 0)
for i in range(0, 1000):
click(780, 640)
click(780, 640)
time.sleep(60)
@youminkim

Copy link
Copy Markdown
Author

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