July 9, 2007

AutoIt – Automate your computing

Posted in Intermediate at 5:41 pm by gloriouscomputing

Glorious Computing is all about eliminating repetitive tasks. It’s hard to say “eliminating repetitive tasks” without thinking of AutoIt.

AutoIt is a scripting language designed for automation. It’s commonly used for:

  • Automating Installers (Thanks to it’s ability to Wait on buttons to show up, and then click them for you)
  • Making prank programs
  • Automating programs that require you to click an unfortunate number of times
  • Automating anything that takes the same multiple steps, and turning into something that takes only one step: running the AutoIt script

I’ve personally used it for simple things like launching PeerGuardian2 and then uTorrent, to more complex things like completely automating the Unreal Tournament 2004 installation process, automatically followed by installing the patch and bonus packs.

Yes, I did say scripting. Trust me though, unless you have a frantic fear of languages that are not English, you should be able to do anything I’ve done after only a moderate amount of learning.

Keeping with the spirit of yesterday’s torrent searching, here’s how to launch PeerGuardian2, wait for it to be running, and only then run uTorrent:

Run(“C:\Program Files\PeerGuardian2\pg2.exe”)
WinWait(“PeerGuardian 2”)
Run(“C:\Program Files\uTorrent\uTorrent.exe”)

The improvement over doing this in a simple batch file clearly comes from line 2. This line waits until it finds a Window which contains the title “PeerGuardian 2”. Until it finds that window, it will not move on to run uTorrent.

This language is rather powerful and simple to get started with. So visit their site now, and reply if you can think of more AutoIt scripts that could be useful to the masses.

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: