24,86 days.
Oops, right, i thought first, a second has 100 msecs
After experimenting a little with AutoIt3, and trying to migrate my AutoHotkey scripts to AI3, here are my remarks:
- Although AI3 supports hotkeys, it is very limited compared to AHK. AI3 uses only the windows API function RegisterHotkey(), AHK too, but is able to use keyboard hooks, which made it possible to implement hotstrings or even using keys like Ctrl itself, to modify certain behaviours in some windows (and yes, I do use hotkeys like CapsLock+LButton, the CapsLock has otherwise no use for me, it is just annoying, when I accidentally press it, so why not completely turn it off and use for something useful?). AHK seems to have "total control" as its goal.
- As already mentioned, AHK is able to use hotstrings, which (when using it wisely) can make life much easier and convenient. Typically i use it to expand abbreviations (even depending on the active window!), and autocorrect typos I often make.
- The way hotkeys are defined in AHK is more flexible than in AI3, consider this example: I want to have a hotkey only in TC, but "let it go through" to achieve the original functionality everywhere else.
Code: Select all
; Ctrl-G (Total Commander: splitter menu)
~^g::
IfWinActive ahk_class TTOTAL_CMD
ControlClick TPanel2, A,,RIGHT
Return
Code: Select all
; Ctrl-G (Total Commander: splitter menu)
AutoItSetOption("WinTitleMatchMode","4")
HotKeySet( "^g", "TC_splitter_menu")
Func TC_splitter_menu()
HotKeySet( "^g" )
Send( "^g" )
If WinActive( "classname=TTOTAL_CMD") Then
ControlClick( "", "", "TPanel2", "right" )
EndIf
HotKeySet( "^g", "TC_splitter_menu")
EndFunc
- AI3 is a full fledged scripting language, much more suitable to write complex and structured scripts. The Scite4AutoIt editor is an amazing tool, making writing of a script as comfortable as in Delphi. An I love that code folding! In contrast, AHK's syntax is ridiculously awkward and inconsistent, variables are all global, no functions can be defined (but it can be simulated with a global ret_val variable, but this is dangerous when having more threads), no arrays can be defined (actually a simulation of an array is possible like var1, var2 etc., some AHK funtions create lists like this).
- AI3 has the ability to call DLL functions, that is a very powerful feature. But this is planned for AHK as well, and as we know, sending messages to controls is already possible (this is suitable for most "hacking" tasks).
- In AI3 an even more powerful ability will be implemented in the near future: the ability to register my scripts as ActiveX or in a DLL! This will allow me to call my scripts from WSH or Delphi.
- AHK has a nice GUI designer written entirelly in AHK (!). I haven't seen similar for AI3, but I wouldn't be surprised if I just overlooked it. On the other hand, AI3's GUI seems to be more advanced, it has more controls and more flexibility. I did not dig into the details nor in AHK or in AI3.
Personal conclusion:
As for me, I mainly use AHK to modify or add to the basic behaviour of some windows or applications, I'm not writing complex scripts (with complex i mean multiple calling of functions, and subroutines several pages long), even though it is very much
possible. Hotstrings are ineviteable for me, i am so much used to them, that i have a hard time using another computer without AHK (before AHK i used MacroExpress). So, for me it looks like i will stick to AHK, with all my struggles with the structure and syntax

. I would like to see both of AI3's and AHK's improvements to AI2 in one product
