Linux, Python

A little fun with Py and FaceBook

There are a lot of stupid games on FaceBook and gamers who wile away a considerable amount of time on those no-skill-required and mindless games. I came across one such game yesterday too. Its pretty basic. You just have to click. Thats all! Just be a dumb-ass and click on a blue facebook-styled ‘Start’ button as many times as you can in 10 seconds. It can’t get any lame than this. I gave it a shot and joined the legacy of those addicted gamers on FaceBook for a while. I scored 46 clicks in 10s. The score was so shy of the 64 one of my friend had and obviously it made me jealous. So I poked my mind and found in my repos a nice app, xdotool. This marked turning point in my FB life (Ok fine! 🙂 I’m just being dramatic) I wrote a script using my new love, Py :

#!/usr/bin/env python
import os
while n<200:
      os.system('xdotool click 1')

Thats  it! I cheated elegantly :)


2 thoughts on “A little fun with Py and FaceBook

  1. Luc says:

    If you change it to 2000 clicks you can reach up to 119/sec with Firefox4b7. It would be interesting what the bottleneck is: X11, JavaScript Engine of the browser, the system (forking) or something else.

    Anyway: Thats for this post, I had quite some fun 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s