views:

722

answers:

2

I realise you can script Microsoft Office apps, but I'm looking for something more general that I can apply to other apps, such as Adobe Acrobat, web browsers and other apps with no scripting ability.

I've used AutoIt but it's a bit clunky, especially when trying to debug why a script fails or stalls. Also, getting the timing of actions, such as clicking a button, or selecting a menu item correctly can be a pain.

Are there build tools that could be used for this purpose?

+2  A: 

I recommend AutoHotKey. Its syntax is not pretty, but most of the times you don't have to concoct your own scripts, because its community is so large and well organized. Even if you do, the documentation is extensive and good and the forums will answer your questions quickly. The developer is active and responsive, which means that bugs get fixed quickly, and new features are being considered and added.

Since I began using AHK I don't imagine doing without it - it allows to make life on Windows simpler in so many ways.

You can also employ the COM interface from Python and other scripting languages. It is more complex, but you get to use a more powerful language.

Eli Bendersky
A: 

I love AutoHotkey (small k...) too, but beside its odd syntax, it has the same lack of debugging tools... Basically, that's "show msgbox alerts, send strings to file or debugview, trace". Which is OK for most cases, since you rarely write long and complex applications with these tools.

In both tools, and probably all macro softwares, "timing of actions" will be hard to get anyway, because events are asynchronous: most of the time, you don't wait a given time, but you wait for a window to appear. Hoping it is the right one!

There are other automation tools, like Ranorex (I didn't tested it), you can even use some scripting language (Lua, Python) with a library to send messages (WM_XXX) and another to call WinAPI... But tools like AutoIt and AutoHotkey have the advantage of having been extensively tested, so they can handle a large number of behaviors/issues (like waiting for clipboard data to be available, etc.).

PhiLho