_personalPrez

Prez Jordan - Blogger, House Enthusiast, Coder, and President.

http://twitter.com/ilictronix
http://ilictronix.com
http://facebook.com/jscales
~ Friday, November 13 ~
Permalink

I Like To Cheat

I recently came across a game on Facebook (here) that I just had to exploit. The goal is to click the button as many times as you can in 30 seconds. This is possible with JavaScript, but I’m a Python coder so I went the extra mile. Enjoy.

## MouseClicker v1.0
## Author: Jordan Scales
## Date:   11/13/09

import ctypes
import time

i = 0
intMax = 930 ## place the amount of clicks you want here.

time.sleep(5)

for i in range(0,935):
    ctypes.windll.user32.mouse_event(2,0,0,0,0)  ## mouse down
    ctypes.windll.user32.mouse_event(4,0,0,0,0)  ## mouse up
    time.sleep(0.015)
    
print 'Done.'

/prez