Put Your Web Browser On Cruise Control 
Saturday, September 15, 2007, 11:08 AM
Posted by Administrator
Autoit3 is a great tool that is used to automate tasks in the Microsoft Windows environment. It can perform such functions as sending keystrokes, copying data to the clipboard, starting programs, and interacting with running programs.

Autoit can provide a lot of benefit to a blogger, for instance, you can create a script in AutoIt that will automatically submit your latest post to Digg, Blog Carnival, StumbleUpon, or any other website.

Another great use of AutoIt is to data mine the web. It is possible to create programs that will control your web browser and have it surf information for you. You could then use AutoIt to open a file and save the data it finds. With some creativity, you may be able to use AutoIt to automatically generate valuable information for your users. One fun way to learn about AutoIt is to create a script that browses the web randomly, although you probably would want to keep an eye on it to make sure it doesn't make its way into any illegal areas.

One thing that AutoIt does not provide immediately after installation is an easy way to scan areas of the screen for specific images. For instance, if you are automating the use of a web browser, often times it is beneficial to determine if a web page has finished loading or not. One way to do this is to scan the status bar of your web browser for the word "Done". I've found a library file that contains some functions that extend the functionality of AutoIt to be able to scan for images. Note that this image-scanning may perform slowly, as it goes pixel by pixel across the screen searching for the image. One way to limit the slowness of this process is to request the _FindPixelRect function to only search in a specific location of the screen, because if there is less pixel data to search through, it will complete much faster.

Note that the image scan file I found by searching the AutoIt forums has an error that prevents it from running, so I'm hosting it here in its correct form to save you from having to debug it. Also, keep in mind that the PixelFunc functions are very useful, but in most cases it is better to use keyboard control as it is much easier to develop and is less likely to change than scanning for images. For example, scanning for an image at one screen resolution may not work when you change it to run at 800x600.

As you can see from my above posts, AutoIt is not for the light-hearted and at least a little bit of programming knowledge is needed to use it effectively. It is nearly a complete programming language, and only lacks a few features. The learning curve is worth it, however, as I've been able to do things that previously would have tied me to my computer 24x7.

You can download AutoIt at http://www.autoitscript.com/autoit3/downloads.php. The PixelFunc.au3 file is found here.

*** Keep in mind that it may be against the Terms of Services of certain websites to run a script against them. ***
20 comments ( 312 views )   |  0 trackbacks   |  permalink   |   ( 3 / 101 )

<Back | 1 | 2 | 3 | 4 | 5 | Next> Last>>