While scripts will function identically to AutoHotkey in almost all cases there are several underlying changes and enhancements.
The script compiler automatically makes the following conversions to ease transition from AutoHotkey:
DetectHiddenWindowshave been replaced with accessors to their respective
SetWorkingDir, %A_Temp%is translated to
A_WorkingDir = %A_Temp%;
IfGreater, var, 10becomes
if var > 10. This includes
SubStrare used in place of older string commands like
Repeatis converted to
ListVarswill do nothing until a future version which has improved debugging support.
In future versions these conversions will be disabled, resulting in compiler errors.
Setting a variable to
null will delete it.
is keyword has become an expression operator to compare types.
continue now have a parameter to indicate which parent loop block should be used.
An each-loop can be used to enumerate objects and arrays with variables
A_LoopField. Strings can be accessed this way by every character.
Function names can be used as variables to refer to their pointers (delegates). Any object can be invoked as a late-bound function.
When scripts are compiled the source code is not attached to the binary file so it cannot be decompiled. This is unlike AutoHotkey which stores a full copy of the script with the compiled .exe which can be extracted and decrypted or read from process memory when it is executed.
Scripts will run the same natively on all operating systems and architectures (32 or 64 bit) with a .NET compatible runtime such as Mono. Almost every version of Windows from XP onwards and most recent Linux desktop distributions have this installed by default.
Source files are read as Unicode text. This is the same for all strings, hotkeys and hotstrings in a script.