I've done something like this in the past. Mainly to see if I could. For me it was "cheating" a web game called "Travian". I used the same technique, but used ruby + Watir. Worked a charm. I had 24x7 buildings being constructed, resources being shipped around from high producers to small ones, armies going out to pillage, etc. For months. Never got caught, and the techniques for finding a bot would have been so, so simple.
Nice article.