AutoHotkey vs AutoIT

What is the difference between AutoHotkey and AutoIT? These two scripting (programming) languages are similar. In fact, AutoHotkey was derived from AutoIT. AutoHotkey and AutoIT are like many other scripting languages (e.g. VBA, JavaScript, PHP) but they are specialized for Windows automation.

I find that the AutoIT syntax is more structured than its AutoHotkey counterpart and this is something that can be useful to create and modify bigger automation applications. But, the difference lies in the fact that, for a casual-user, AutoHotkey is probably easier to get started with and to work with. It is also more powerful than AutoIT when it comes to managing hotkeys linked to simple actions (keyboard shortcuts).

So, if you intend to create full-featured automation applications, I would suggest AutoIT. But, if your intention is to create simple keyboard shortcuts, I would suggest AutoHotkey. Some examples of the latter would be using a hotkey to open a folder/document, start an application, insert text, show a webpage, use an extra clipboard, run an Excel macro, etc.

Update on February 7, 2018: For many users, who may only need simple keyboard shortcuts, installing and learning AutoHotkey, and keeping up to date, can be overkill. ShortKeeper—a lightweight software utility—lets you manage an AutoHotkey based system in a way most non-programmers will find remarkably efficient and effective. And it’s free!

By Denis Lamarre

11 thoughts on “AutoHotkey vs AutoIT”

  1. From the AutoHotkey website, you can have English, French, Deutsch, Russian, Japanese and Greek documentation. I didn’t found something like this in the AutoIT website. Je parle français et c’est très intéressant. Merci AutoHotkey

    Reply
  2. im not very familiar with autohotkey, but AutoIt is great!

    It can overtake and, if u dig deep enough, fully automate some repetitive time based tasks in any windows enviroment (while u work on a beer consuming or whatever else important, vuola)!

    a lil good hammer to rip bureaucracy monster 😀

    Reply
  3. “But, after the creation of a few hotkeys, we usually find that remembering these hotkeys is quite complex”
    This is exactly why I created AHK Command Picker (https://github.com/deadlydog/AHKCommandPicker). Check it out. Basically it allows for type-ahead searching of all of your scripts (I call them commands). For example, instead of having to remember the shortcut key to launch a new email, you just hit Caps Lock and type “New Email” (since it’s CamelCase type-ahead really all you have to do is type “ne”). Check it out; I’m sure you’ll love it.

    Reply
  4. Comparing those two, I’d choose Lordui – it’s simple, powerfull, but what is most important it can trace the state of screen. So it will never do a blind clicks on random screen area.

    Reply
  5. AutoHotkey can be used to create big applications too. (Have a look at Columbus, AHK Studio etc). The whole project is open source, therefore you can fork whenever you want and still have the latest features.

    AHK (like AutoIT) also has a DLL which can be used along with C, C# etc.

    Reply
  6. I agree that Autohotkey is much more powerful to manage shortcuts.
    I do not think, however, that it is easier for newby:
    – confusion about %% or not %% using variables
    if MyVar = %MyVar2%
    MsgBox The contents of MyVar and MyVar2 are identical.
    – concatenation by several way (. etc), except more standard “+” or “&”
    – function name must be without space before parenthesis, while commands need a space (otherwise are thought to be function name)
    – if command with or without parenthesis depending on complexity of expression
    – commands with comma delimited parameters (e.g. loop,…), but function with parameters inside parenthesis
    – always local variable inside function creating confusion with global ones (it should warn about same variable in global scope or advice to use global declaration)
    – space & tab trimmed off by string value (depends on AutoTrim)

    Some of the above problems don’t give error, warning or advice, but simply a wrong result (e.g. trying using global variable inside a function).

    Reply
    • AutoHotkey should be easier for a newbie if he/she wants to do simple shortcuts. Let’s say he/she wants to open the folder “My Documents” with the F1 key.

      With AutoHotkey:

      F1::Run %A_MyDocuments%

      With AutoIT:

      HotKeySet(“{F1}”, “openDocs”)
      Func openDocs()
      Run(‘explorer ‘ & @MyDocumentsDir)
      EndFunc

      There is no doubt that AutoHotkey shines for these kinds of simple shortcuts. Of course the simplicity of AutoHotkey brings some ambiguities and challenges with more complex shortcuts as you pointed out in your comment. Not everyone needs/wants to learn why the AutoIT version of the shortcut follows useful rules to develop complex programs.

      As a programmer, I must admit that sometime I had to scratch my head to understand the simplicity of AutoHotkey.

      Reply
    • Currently looking into AutoIT after using AutoHotkey avidly for over 8 years. AutoHotkey v2 will address many of these issues but it’s been in the works for ages.

      Reply

Leave a Comment