Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''
- Once the script runs, you get 5 seconds to get to the zerg rush game.
- Then it starts clicking like mad. thats it.
- '''
- waitTime = 5 #number of seconds to wait before starting to click
- clickCycles = 30000 #number of times to click
- import win32api, win32con, time
- #Clicks a location
- 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)
- i = 0
- print "starting in "+str(waitTime)+" seconds"
- time.sleep(waitTime)
- #clicks 30000 times... so a couple minutes.
- while(i< clickCycles):
- x,y = win32api.GetCursorPos()
- click(x,y)
- time.sleep(0.01) #don't want to blow up the computer
- i = i + 1
- print i
- print "DONE!!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement