views:

2955

answers:

7

I need to choose a windows automation program. Which one do you recommend? AutoIt, AutoHotkey, others?

I have read http://paperlined.org/apps/autohotkey/autoit_and_autohotkey.html , interesting history but without a clear recommendation. Searching on google leaves a winner (around 312k hits for AutoHotkey Windows vs 482k hits for AutoIt Windows). In StackOverflow there are 15 questions tagged as AutoIt vs 18 for AutoHotkey.

I am interested on your opinion as programmers. Which one do you think is easier to use, more deployable and more powerful in terms of functionality?

Note: I have already used AutoHotkey for personal use. So my initial preference is for this.

+2  A: 

I have been extremely happy with AutoIT. The language is an easy flavor of Basic. They include great help files, a script compiler, an editor that understands not only the syntax but supports F1 for help, etc. They have plenty of code samples.

I don't have any first hand experience with AutoHotKey - I do remember considering it but I've never looked back since using AutoIT.

Sam Russo
+5  A: 

I've used both very much.

AutoHotKey is very good at managing hotkeys and basic GUI automation. It's syntax is horrible and it's not meant for bigger applications. It lacks arrays for example.

AutoIt has almost every feature AHK has and much more. COM-automation support, arrays and a pretty nice UDF (User Defined Functions) library. It's harder to build complex hotkeys in AutoIt.

ArcisCannae
"It lacks arrays for example." : there are other branches of autohotkey (as it is open source) which support COM, Unicode, and Arrays.Also the syntax "problem" is totally subjective, I love the ahk syntax and hate Autoit's basic-like syntax... I dont like having to use a function for everything I do.IronAHK is a .NET version of ahk which of course gives you more flexibility
RaptorX
+1  A: 

I think ArcisCannae summarized well the differences.

I used AutoIt because AutoHotkey (AHK) was created, when it has a clumsy syntax inherited from BAT files... I fear I don't have much experience with current AutoIt to make correct comparison. I know it has a quite regular syntax, while AHK's syntax, although greatly improved from the original batch style, is quite clunky and seems odd to programmers. Funnily, people having never coded before actually love this syntax!

Personally, I hesitated a lot, read numerous comparison articles, and finally chose AHK despite its syntax, partly because of its superior hotkey management, partly because it was open source. Author was active at the time (looks like he reduced a bit the rate of releases but still work on it) and is open to suggestions: at a time I shown a prototype of regular expression support using PCRE DLL, and author integrated the idea and concepts and pushed them beyond (RE support in window name detection for example).

Documentation is excellent, detailed and full of examples with a comprehensive index; the community is very active and helpful; binary is compact and you can make a standalone exe with your scripts.

It also has a nice little GUI support, good for quick simple dialogs.

I won't say one is "better" than the other, the choice is mostly a matter of taste, feeling, needs...

PhiLho
+3  A: 

I worked with AHK for a while and thought the language was difficult to create with -- I suppose it is either an acquired 'taste' or some people just have an affinity for it. I was a long-time Perfect Keyboard user but am now a huge fan of AutoIt -- though it is Basic-like, I can still write "C" like programs which is most comfortable for me. And -- the libraries for AutoIt -- what a time saver...for example, I'm a big Firefox fan, don't really care for IE, but when I've got to automate something in a browser window the library available for IE has a lot of great and useful functions. Good IDE, and active user community.

My vote is with AutoIt.

+3  A: 

I use both depending on the situation. AutoHotKey is nice for quick keystroke macros and AutoIT has a much broader range of automation functionality and UDF's allow a range of useful things such as XML and DB interaction. When automation requires a lot of GUI interaction I use AutoIT.

NateH
+1 - `When automation requires a lot of GUI interaction I use AutoIT.` I wish I'd asked this first!
Samrat Patil
+9  A: 

AutoHotkey is the better program and some people responding may have never used it, so don't know its full capabilities and chose AutoIt. I also think AutoHotkey's GUI implementation is easier to use and so are many of it's commands. AutoHotkey has 3 major forks that blow away AutoIt. AutoHotkey_L, which has COM, Unicode support, Object-oriented like, Arrays, and more... AutoHotkeyCE which works on Windows mobile, PDAs, and smartphones. IronAHK, which is a .NET version of AutoHotkey that is 60% finished. There is also an AutoHotkey DLL that you can call from other programming languages. AutoHotkey is also OPEN SOURCE, while AutoIt is not and closed source. I would say the only down side is that you have to do more searching and researching on the AutoHotkey site to find and put all the tools together that you may want or need. AutoIt does better at packaging all of its tools in it's initial download.

My vote is for AutoHotkey (AHK).

Zenjin
I agree. I'm using AHK to automate certain tasks, it does its job well. The UI and the resources are pretty horrible to get by. I was hoping something like a record button which records mouse clicks etc like macros, but here one needs to write a script even for the most basic tasks. But nonetheless very happy whenever that gets done!
Samrat Patil
A: 

Autoit I a tremendous tool to have in your box, and its seductive ease of use and immense library of UDFs, coupled with an unbeatable helpfile, is hard to compare to.

I tried AutoHotKey for a while, but its clunky feel and shabby syntax turned me off within a couple of months.

Why settle for the ugly sister when you wine and dine the princess herself.

Autoit 100%

Narcoleptic Norris.

Norris Green