For an overview of changes in major and minor releases, see the following:
For full technical details of changes, refer to GitHub.
Added "void" return type for DllCall, ComCall and CallbackCreate.
Changes applicable only to alpha users:
Removed a?.() and a?.[]; use (a?)() and (a?)[] instead.
Removed property type strings (i32, u32, etc.).
Removed typeless typed properties (size specifier without a class).
Fixed Class objects not allowing Base assignment. (Broken by v2.1-alpha.28)
Fixed String(x) crashing when x.ToString() returns no value.
Fixed x?.%y% to not be interpreted as a syntax error.
Fixed StrGet(x, 0) returning a number. (Broken by v2.1-alpha.28)
Fixed StructClass.Ptr().__Value := unset to be permitted.
Fixed Struct.Ptr() crashing (only with the Struct class itself).
Fixed virtual ref assignments to permit unset.
Fixed errors raised during evaluation of DllCall output args not transferring control correctly.
Fixed errors like !a ?? b and b + a ?? c to be caught at load time.
Changed maybe operator (?) to be able to short-circuit most operators.
Changed X() => Y() to propagate implicit blank-unset return. In other words, if Y returns without specifying a return value or unset expression, X behaves as though it did the same. This applies only to tail calls of functions and methods, not properties.
Changed v2.1 mode default return when any return expr is present.
Changed some functions/properties to return unset in v2.1 mode.
Fixes applicable only to alpha users:
Fixed Map and Array not throwing UnsetItemError in v2.0 mode when return value is unused.
Fixed Struct.Array.Prototype to not permit new typed properties.
Fixed ClassObj.Prototype.Base to be writable if no typed properties.
Fixed ControlGetItems/ControlGetChoice not throwing for Tab controls.
Fixed error reporting for ComObjArray().__Enum(), if it ever fails.
Fixed TraySetIcon("HBITMAP:" handle) without *.
Changed #Requires to set compatibility mode. In this release, it only affects default return values.
In v2.1 mode, user-defined functions and built-in functions without an explicit return value return unset instead of "".
Changes applicable only to alpha users:
Removed #DefaultReturn.
Changed StructClass.Prototype to be read-only.
Changed StructClass.At() to permit StructClass to have no fields.
Optimized code size.
Fixed ObjSetDataPtr throwing on success.
Fixed StructClass.At() where StructClass has a nested struct.
Fixed classes with inherited nested structs.
Fixed return unset from an OnMessage callback to act as return "".
Fixed Map and Array to throw UnsetItemError, not UnsetError (when ? and ?? are not used).
Fixed ByRef alias to global var becoming unset in recursive calls.
Fixed error raised by Hotkey() not transferring control correctly.
Changes applicable only to alpha users:
Changed a.Base := b to be invalid when a or b has typed properties.
Further revised construction of objects with typed properties, reducing memory usage and potentially improving performance.
Fixed instantiation where .Prototype is a non-Prototype Object.
Fixed Ptr class not being deleted if target struct has no fields.
Fixed navigation with Tab key in a Gui with a nested Gui (+Parent).
UX/DashAdded an optional check for AutoHotkey updates, disabled by default. [based on UX PR #11 by kczx3]
Fixed errors being raised when arrow keys are used in the Help Files menu. [UX PR #24 by iPhilip]
Fixed install-version.ahk to delete the temporary ".staging" directory after installing an upgrade.
Fixed Help Files menu to be displayed at the button, not at the mouse cursor.
Changed "New script" to add the file to recent files.
Changed message handling to fix keyboard shortcuts (not hotkeys) failing to work while a modal dialog box is being displayed. This affects shortcuts in the script's main window and some keyboard input for Gui windows and dialog boxes (when multiple are shown).
Changed handling of some internal messages related to dialog boxes.
Changed #SingleInstance and Reload to post WM_CLOSE to close the old instance (instead of an undocumented message).
Changes applicable only to alpha users:
Typed property definitions can no longer be owned by any Object which is not a Prototype.
Changed DllCall(F, S, unset) to pass S() itself if it has no __value setter.
Cleaned up parts of the code relating to object construction, reducing code size and possibly improving performance in some cases.
Memory for typed properties is now allocated with the main object, reducing memory overhead and speeding up allocation and deallocation.
Fixed Start menu failing to appear when the Start button is clicked if a script running as admin or with UI access is displaying a menu.
Fixed StructClass.Ptr to not seal StructClass structure when evaluated.
Fixed struct return types for typed callbacks.
Fixed alignment of arrays within a struct.
Fixed some reference-counting errors in CallbackCreate. [PR #356]
Fixed IsSet to permit expressions ending with a question mark.
Added ahk_opt for WinTitle parameters (overrides default settings).
Changes applicable only to alpha users:
Moved __Value definition from each Ptr class into Struct.Ptr, fixing memory usage.
Fixed WinExist("", "Text") to not retrieve the title of each window.
Fixed some error messages not pointing to the line which raised the error.
Fixed DllCall to reject array classes for the return type, not crash.
Fixed global g in a function conflicting with prior export global g.
Fixed crash when calling an unset global via a Module object.
Fixed module initialization changing the line reported by subsequent errors.
Fixed A.B where B is wildcard-imported into module A.
Fixed ModuleA.B to initialize classes and imported modules.
Fixed GUI control calculations causing Critical Error on any OS prior to Windows 10 version 1607; e.g. Gui().AddButton() without "w" option.
Changed how key-up events are correlated to key-down events for the purpose of determining whether to suppress key-up. A key-down with SendLevel between 1 and 7 now only correlates with a key-up of the same level. When #InputLevel 1 is in effect, this fixes Right::Send "{Right}" not suppressing key-up, RShift::RAlt interfering with RAlt::RShift and vice versa. Events with SendLevel 8 and above are still grouped with non-sent events for practical reasons.
Fixed WinExist("A",,,"B") to not exclude windows which have no controls.
Fixed custom combo hotkeys with neutral modifiers (e.g. Alt & Esc::) [broken by v2.0.22].
Fixed key-up hotkeys to fire consistently when the key is used as both a prefix and a suffix (e.g. a & b::, b & a:: and a up::).
Fixed timers interrupting MsgBox after the timeout starts but before the window is shown, such as if SetTimer(MsgBox, -10) is used immediately before MsgBox(1,,"T1").
Implemented #Import Export ModuleName {*}.
Enhanced CallbackCreate to optionally accept an array of parameter types.
Added Offset sub-parameter for DefineProp, to allow unions.
Changed StructClass.Ptr to subclass StructClass.base.Ptr instead of Struct.Ptr.
Changed GetOwnPropDesc to return classes for numeric types.
Fixed undefined behaviour when DllCall is passed a Struct class with no fields.
Fixed StructClass[N].Ptr (pointers to array types).
Fixed #Import ":N" importing the wrong file when used under #Module in an #Include file.
Fixed undefined behaviour when a nested struct releases the last reference to the outer struct.
Fixed repeat references to struct array classes causing undefined behaviour.
Fixed circular references preventing deletion of Struct.Ptr/Array classes.
Added numeric type classes extending Struct.
Added structured array classes, created by StructClass[N].
Changes applicable only to alpha users:
Fixed #Import "Path:__Init" to resolve even if there's no #Module.
Fixed explicitly importing built-in objects from AHK module.
Fixed Struct.Prototype.Size to return struct size, not allocated size.
Fixed #Import to not allow loops such as a var pointing to itself.
Fixed struct/class validation of base class to not depend on ordering.
Fixed class declarations to not permit a class to subclass itself.
Removed the undocumented effect that a hotkey with the </> prefix had on the corresponding modifier key; e.g. <^a:: causing LCtrl:: to fire on release, inconsistent with the documentation. Always firing on press provides greater consistency and flexibility. The modifier key itself was suppressed since v2.0.20. Neutral modifiers such as Ctrl:: always fire on release, and similar behaviour can be implemented with A_PriorKey and ~LCtrl up::.
Changed error dialogs to use msftedit.dll instead of riched20.dll to fix the following issues:
Fixed errors within __Delete being suppressed if a Try/Catch is active.
Fixed CallbackCreate to validate ParamCount.
Fixed detection of DllCall(... "str",&var:={} ...) as an error.
Fixed CapsLock:: to suppress even if CapsLock is used as a prefix key.
Fixed neutral Ctrl/Alt/Shift hotkeys to not suppress the key [broken by v2.0.20].
Fixed fire-on-release behaviour of neutral Ctrl/Alt/Shift hotkeys when a key-up variant is turned on but disabled by #HotIf.
Fixed CapsLock & 1:: to revert CapsLock state even if another prefix key is pressed before CapsLock is released.
Fixed L/R modifier key-up not being suppressed in some cases where key-down was suppressed.
Fixed L/R modifier key-up to be passed through if ~ is used even if key-down was suppressed.
Fixed L/R modifier hotkeys to fire on press even if the corresponding neutral modifier is present; e.g. LCtrl:: with Ctrl::.
Fixed corruption of unquoted continuation sections with trailing spaces.
Fixed file stream I/O to flush cached writes if the file hasn't been closed when the process exits.
Fixed `; in continuation sections with the ` (literal escape) and C (comment) options.
Cleaned up some code within the keyboard/mouse hook.
Changed Type to return "unset" if the parameter is omitted/unset.
Changed IsSet to permit an unset expression without an assignment.
Added DefineProp function.
Added Struct keyword and class.
Added automatic struct.Ptr classes.
Changes applicable only to alpha users:
Changed DllCall, StructFromPtr and typed properties to require a Struct subclass.
Changed export a() => b to be a function call statement as in v2.0.
Removed StructFromPtr.
Removed ObjGetDataPtr fallback for DllCall Ptr parameters.
Fixed IsSet(p) to return 0 if p is an unset virtual reference.
Fixed #Import __Init failing if there are no sub-modules.
Fixed the wrong module being reopened at the end of a file containing #Module.
Fixed the not-RegExMatch operator (!~=).
Changes applicable only to alpha users:
Changed the not-RegExMatch operator from ~!= to !~=.
Removed Import statement and fixed some minor issues with #Import parsing.
Changed #Module names to be local to each file-based module.
Changed #Module to end at the end of the file which directly contains it.
Changed #Module to require a valid identifier.
Changed #Module __Init to reopen the initial module of a file import.
Added #Import "file:mod" for importing #Module mod from file.
Changed module initialization order to be overridden by first reference.
Changed #Import to recognize undeclared global variables.
Added error detection for #Module being repeated via #Include.
Added error detection for #Module being immediately preceded by a double-colon hotkey label.
Fixed #Import loading duplicate modules.
Fixed #Import to recognize imported names regardless of import order.
Added a ~!= b, equivalent to !(a ~= b).
Added #Import (see below).
Changes applicable only to alpha users:
Changed Import and Export syntax to be backward-compatible with v2.0:
Export X and Import X are once again function call statements.Export Global X exports a global variable (the Global keyword was added).as, from and X {} are not valid in an expression.Changed Import x {} to add x to the global namespace even without as x. By contrast, Import "x" {} and Import {} from x still do not add x to the global namespace.
Changed Import to check the current file's directory before the search path.
Changed #Module to allow reopening modules.
Fixed undefined behaviour in initialization of module search path.
Fixed #Module to strip quote marks around its parameter.
Added #StructPack and Pack sub-parameter for DefineProp.
Changes applicable only to alpha users:
Changed Import to permit importing the same item multiple times.
Changed module object to permit accessing any global variable.
Fixed return preventing other modules from executing.
Fixed StructFromPtr to support assigning to nested structs with __value.
Fixed top submenu item ignoring some clicks if a Gui is active when the menu is shown.
Fixed #Include <A_B> crashing when neither A_B.ahk nor A.ahk exist.
Fixed global/static objects to be released on exit (this was disabled in v2.1-alpha.11).
Fixed StrGet crashing when given an address and not a length. (Broken by v2.0.20)
Fixed potential undefined behaviour in message callbacks during script termination.
Fixed Run not closing the process handle.
Fixed GuiFromHwnd crashing if passed another script's GUI window HWND.
Fixed leading space in For( a in b ) incorrectly raising an error.
Fixed enumerator calls (For) treating implicitly returned "" as true.
Fixed A_maxHotkeysPerInterval and A_Hotkeyinterval returning incorrect values if spelled in lower case.
Fixed FileSelect duplicating the filter pattern if it lacks *..
Fixed ListBox tab-stop spacing when T option is used during control creation. [PR #346]
Fixed ~RAlt & <:: causing RAlt:: to fire on release despite ~ (and likewise with other L/R modifier keys).
Fixed remap with nonexistent source key causing silent exit.
Fixed key-up hotkey causing unwanted passthrough when modifiers don't match. e.g. RButton release not being suppressed after activating RButton:: if ^RButton up:: was also present.
Fixed semicolon in /* ; */ preventing the block comment from ending.
Fixed IsOptional and IsByRef return values for built-in methods.
Fixed RegWrite parameter 1 to be mandatory.
Fixed string return value being corrupted during debugging.
Fixed erroneous Else placement to raise an error, not crash on load.
Fixed StrPut/StrGet handling of 32-bit integer limits on x64.
Fixed 1:: to not fire after 1 & LButton up:: is used, and similar.
Fixed crash when ListView has the Sort option and Add is called with Col1 omitted.
Fixed static functions not using static variables of grandparent functions.
Fixed unpaired key-up hotkey not suppressing the key if it is also used as a prefix but the custom combos are disabled or have the tilde modifier.
Fixed L/R modifier hotkeys to suppress even if the corresponding neutral modifier is present; e.g. LCtrl:: with Ctrl::.
Fixed MinParams to account for mandatory parameters to the right of an optional parameter in ControlGetPos, ControlMove, ListViewGetContent and MenuSelect. In other words, it returns the minimum required Length of the parameter list rather than the count of mandatory parameters before the first optional parameter.
Changed user-defined functions to permit optional parameters mid-list.
Changed ahk_class to be case-insensitive.
Optimized window searches; see WinTitle - Performance for details.
Optimized ProcessGetPath/WinGetProcessPath.
Changes applicable only to alpha users:
Changed #HotIf to affect only the current module.
Moved Props from Object.Prototype to Any.Prototoype and added Props function.
Added RTL option for Menu.Prototype.Add.
Changes to module support:
Added module search path and removed the "Lib" subdirectory from the default locations.
Added Import from file: import "path\name"
Added Import from resource: import "*RESNAME"
Added alternative Import syntax for better alignment of module names: import ModuleName {*, Names}
Changed Import to require a single identifier for module name if not quoted.
Added export import to import and export names at the same time.
Other changes applicable only to alpha users:
Added automatic DPI rescaling for ListView columns.
Fixed Gui DPI scaling prior to creation of window (e.g. for +MinSize).
Fixed Gui to initialize to current DPI, not process-start DPI.
Fixed various Gui calculations to be per-monitor DPI-aware.
Fixed Gui default font to adjust automatically when DPI changes.
Fixed IsSet(v := a.b?) and IsSet(v := f()?) when v is a string.
Added disableWindowFiltering to the manifest embedded in each EXE, allowing more windows to be detected.
Changed the default DPI awareness mode from system to per-monitor v2.
Implemented basic support for per-monitor DPI awareness, including:
For details, see DPIResize (Gui).
Changes applicable only to alpha users:
Fixed HotIf(obj) not finding existing criterion.
Fixed #DefaultReturn with nested functions or class var initializers.
Fixed named function hotkeys with parameter default expressions.
Fixed non-raw hotstrings where both sides start with any of ^+!#{}.
Fixed debugger to not interpret names starting with "inf"/"nan" as float.
Fixed buffer overrun when RegExReplace callback returns a number/object.
Fixed function definition expressions in "single-line" hotkeys.
Fixed memory out-of-bounds access during RegEx compilation.
Fixed externally-released modifiers to not be "restored" post-Send.
Fixed modal dialog boxes suppressing InputHook events.
Fixed key-up erroneously being suppressed after key-repeat presses it down in some cases.
Fixed Critical Error when loading large icons with no alpha channel.
Fixed MouseGetPos to make Control blank and not throw if ClassNN cannot be determined.
Fixed FileSelect to validate Options.
Fixed unexpected Catch/Else/Finally/Until not being flagged as an error in some cases.
Fixed Try/Catch/Else/Finally not executing Finally if Else returns.
Fixed execution of if-else-if-else-if containing fat arrow functions.
Fixed A_Clipboard silently exiting when GetClipboardData returns NULL.
Fixed a.b[c] := d to invoke the getter for a.b if there is no setter.
Added InputHook H option to allow intercepting hotkeys.
Added A_HotIf and a return value for HotIf.
Changed TraySetIcon to update the icon of the script's main window.
Changed text input collection and dead key handling.
Changed InputHook handling of {dead key}{BS} so BS cancels out dead key.
Changes applicable only to alpha users:
Fixed load-time crash for #Include %A_TrayMenu%.ahk (which is invalid).
Fixed dynamic references at the module level resolving incorrectly if the module is being executed earlier due to being imported by another module.
Fixed import x to add x to the module list when loading from file.
Added a warning for UTF-8 decoding errors in script files.
Changed debugger to list properties defined by the Prototype for non-Object classes such as VarRef and ComValue.
Changed debugger classname attribute of Prototype objects to include the class name (e.g. "SomeClass.Prototype").
Changed debugger to never list the natively-defined __Class or Base properties.
Changes applicable only to alpha users:
Fixed class A extends B failing to resolve B, depending on order.
Fixed error dialogs not showing vicinity lines.
Fixed propagation of errors thrown when getting/setting a virtual reference.
Fixed debugger to not attempt evaluation of property getters directly on a Prototype.
Implemented an optimization to the WinText parameter by Descolada. [PR #335]
Changed UnsetError message to suggest a global declaration instead of appending "(same name as a global)" after the variable name.
Changed VarUnset warning message for consistency with UnsetError.
Fixed the increment/decrement operators to throw UnsetError if the var is unset, not TypeError.
Fixed OwnProps to assign the property name safely in cases where a property deletes itself.
Fixed breakpoints to work in arrow functions under a control flow statement without a block.
Fixed debugger to break at the line of the call when stepping out of a function. (This behaviour was added in Revision 31 and broken by v1.1.30.00.)
Stepping out of a function which was called as a new thread now breaks at the line which was interrupted, instead of waiting until the next line is reached.
Fixed debugger to not delete temporary breakpoints which are ignored while evaluating DBGp property_get or context_get.
Fixed load-time errors sent to stdout showing incorrect file/line number in some cases.
Fixed ExitApp on load-time error/warning dialogs to use exit code 2.
Fixed locating WindowSpy.ahk in Current User (non-admin) installs.
Fixed DBGp property_get paging items incorrectly (again).
Fixed StrPut failing if Length/Buffer is specified and MultiByteToWideChar doesn't support the WC_NO_BEST_FIT_CHARS flag for the target codepage.
Fixed Download to attempt anonymous authentication if the server requests client authentication.
Changed how #Warn settings are applied.
#Warn Type, Mode: as before.#Warn Mode: sets program-default reporting mode.#Warn Type[, On]: enables warning and uses program-default mode.#Warn: resets warnings to default (intended for use in a module).Changes applicable only to alpha users:
Fixed #Warn LocalSameAsGlobal causing a load-time crash.
Fixed built-in/wildcard imports in assume-global functions.
Added Modules, #Module, #Import and Export.
Changes applicable only to alpha users:
Fixed leak from virtual references which return objects.
Fixed __Set (broken by v2.1-alpha.10).
Fixed leaks when the debugger enumerates properties.
Fixed DBGp property_get failing to retrieve properties due to incorrect paging (since v2.0.14).
Fixed DBGp property evaluation causing Try without Catch to fail (since v2.0.14).
Fixed <base> debugger pseudo-property leaking a reference (since v2.0.14).
Changed how KeyOpt (InputHook) applies option removal for SC-based keys.
Changed WinTitles with two different ahk_id values to yield no match.
Changed RegExReplace to support binary zero in Replacement.
Implemented virtual references.
Added Object.Prototype.Props(), which enumerates own and inherited properties.
Improved DBGp property and context commands:
Changed the default DBGp max_children to 1000 and max_depth to 1.
Added Error.Prototype.Show(Mode?).
Changes applicable only to alpha users:
Fixed Class(X) to not call __Init (inherited from X) on the new class.
Fixed IsSet(x := y?).
Fixed Gui Control to pass itself (not the Gui) to message callbacks.
Fixed RegEx callouts which lack a function name, such as (?C).
Fixed x.y() => z to be recognized as a syntax error.
Changed Throw to be non-continuable as in v2.0.
Fixed the error dialog to handle letter key shortcuts even when text is focused.
Fixed MonthCal W-n (number of month) width values to not be affected by DPI scaling.
Fixed Click to not return an integer.
Fixed detection of key::try { as an error.
Fixed :B0*O:XY::Z to produce XYZ rather than XZ (suppressing Y).
Fixed Send to leave any prior {modifier Down} in effect even if the key happens to be physically held down.
Improved the reliability of the script taking focus when a menu popup is shown.
Debugger improvements:
Fixed stdout/stderr packets sent during the processing of another command to not corrupt the pending response.
Fixed property_get -n <exception>.message and similar.
Fixed corrupted results from property_get when a property returns a temporary object with a string, such as x.y.z where y => {z:"a"}.
Fixed crashes when an asynchronous command is received during the processing of another command.
Fixed exceptions not being deleted after they are suppressed via property_set.
Fixed property_get -c 0 -d 0 to allow global variables, as already allowed by -d 1.
Fixed property_get paging enumerated items incorrectly.
Improved property_get to support property getters with one parameter (previously only the implicit __Item property supported this).
Improved property_get to support properties of primitive values. The value must still be contained by a variable or returned from a property.
Improved property_get to allow calling functions with <=1 parameter.
Improved property_get to support float keys/parameters.
Changed debugger to suppress exceptions during property evaluation.
Changed debugger to ignore errors thrown by __Enum (treat as no items).
Changed the <enum> pseudo-property to require __Enum. This prevents the object itself from being called as an enumerator.
Small code size optimizations in the debugger.
Changed Hotkey function to throw ValueError if Options contains an invalid option.
Fixed InputHook to respect the +S option for Backspace when acting as undo.
Fixed debugger to safely handle property deletion during enumeration.
Fixed OLE clipboard content (e.g. error dialog text) being lost on exit.
Fixed detection of invalid suffix on a hotkey, such as Hotkey "a pu".
Fixed DllCall AStr* arg type to copy back only if address changes.
Fixed #Include to correctly "close" any built-in variable it reads (no known impact on real-world scripts).
Fixed WinTitles with two different ahk_id values to yield no match.
Added rudimentary struct pointers (StructFromPtr).
Changed MouseGetPos to throw OSError if the mouse position cannot be determined.
Changes applicable only to alpha users:
Fixed static var := unset.
Fixed throw() within Catch to re-throw.
Fixed non-struct objects to not be allocated data by default.
Fixed memory leaks during unsuccessful construction of struct classes.
Fixed crashing when block-end immediately follows If/Loop/etc.
Fixed load-time detection of duplicate typed properties.
Fixed crashing when constructing an object which had a property of struct type redefined or deleted.
Fixed object never being deleted if a nested struct __Value was invoked.
Fixed Gui GetPos/GetClientPos when Gui has an owner window or +DPIScale.
Fixed Until preventing subfolder recursion in file loops.
Fixed DllCall to throw when arg type is UStr.
Fixed a memory leak occurring for each regex callout.
Fixed Send erroneously releasing a modifier due to a race condition. For example, ~LAlt::Send "{Blind}x" intermittently released LAlt if some other keyboard hook was installed more recently than the script's own hook.
Fixed icon loader to prefer higher bit-depth when multiple bitmaps of the same size are present.
Fixed SendInput failing to release LCtrl if it had already released RAlt and the layout does not have AltGr.
Fixed key-up hotkeys not firing if the key repeats after modifiers change. For example, F1::Send "{Ctrl down}" should allow F1 up:: to execute when the key is released even though Ctrl is down, but was not allowing it after key-repeat occurs.
Fixed an error message to refer to #HotIf rather than #IfWin. [PR #327]
Fixed OwnProps erroneously skipping properties with optional parameters.
Fixed inconsistent behaviour of cloned dynamic properties.
a.b[c] to evaluate as (a.b)[c]).Fixed SysGetIPAddresses causing a Critical Error when the network subsystem is non-functional; e.g. in Windows safe mode.
Changed ControlGetFocus to return 0 when focus can't be determined, such as when a console window is active.
Optimized auto-replace hotstrings to avoid retyping an identical leading part, where feasible.
Changed the following to use ASCII-only case insensitivity instead of locale case insensitivity: UseTab method (excluding Exact mode, which was already ASCII-only), Choose method and Text property (Tab control); Add method (Menu).
Changes applicable only to alpha users:
Fixed A_ThisFunc and dynamic references in parameter default expressions.
Added a workaround for the first shown menu not accepting keyboard input on Windows 10.
Fixed the Add method (Gui) to support the ShortDate option for DateTime controls.
Fixed a reference counting error with multi-level function nesting.
Fixed #include <x> causing a load-time crash if used inside a function.
Fixed ListView.Opt("NoSort").
Fixed a memory leak occurring when an object with no own properties is cloned.
Fixed #include and FileInstall (non-compiled) to compare file names ordinally, not linguistically.
Added SetCue method for Edit and ComboBox controls. [PR #315]
Changed FileCreateShortcut's ShortcutKey parameter to permit the ^, + and ! modifiers. [PR #310]
Added A_KeybdHookInstalled and A_MouseHookInstalled. [PR #326]
Added GuiControl.Prototype.OnMessage, utilizing window subclassing.
Changed Menu ToggleCheck/ToggleEnable to return the new state.
Changes applicable only to alpha users:
Fixed Gui.Prototype.OnMessage to set A_EventInfo the same as OnMessage.
Fixed crash on load if the first class var initializer uses =>.
Fixed crashing when a named function hotkey is used after #HotIf.
Fixed numeric literals ending with a dot to not cause line continuation.
Fixed pre-increment/decrement to work with chained array indexing.
Fixed OnNotify/OnCommand applying styles only applicable to OnEvent.
Fixed FileExist/DirExist leaking handles when emptydir\* is used.
Fixed DirExist leaking handles when only files match.
Fixed bugs added by v2.1-alpha.5:
return (){ being interpreted like return return (){.Changed Ctrl::Alt to not send an unsuppressed {Ctrl up}. This was originally intended to work around an issue with system handling of the modifier keys, but was superseded by a better workaround in v2.0.8.
Added support for using WheelUp, WheelDown, WheelLeft and WheelRight on either side of a remapping.
Removed a length limitation for parameter default strings (but not expressions).
Optimized ternary by removing a redundant check for numericness.
Changes applicable only to alpha users:
Fixed a reference counting error in construction of nested structs.
Fixed issues with function definition expressions.
x::y(h?){ was implicitly permitted but was not behaving intuitively; it is now interpreted as though y was on a new line.Fixed &x:=unset to be permitted.
Fixed stacking of hotstrings with the X option.
Fixed debugger not listing local vars if the function is at the bottom of the stack.
Fixed Gui threads to show on the debugger's call stack.
Fixed some combinations of &/ByRef causing stack overflow in ExitApp.
Fixed ByRef parameters erroneously assigning the default value to the caller's VarRef if unset.
Fixed some issues affecting suppressed Alt/Ctrl/Shift/Win hotkeys, such as:
*LCtrl:: blocked LCtrl from the active window, but sending Alt-key combinations would fail because the system thinks Ctrl is down, and would therefore send WM_KEYDOWN instead of WM_SYSKEYDOWN.*LAlt:: caused the system to forget any prior {LAlt DownR}, so a remapping such as LCtrl::LAlt would not behave correctly while LAlt is physically down, even though LAlt was suppressed.Fixed some issues affecting continuation sections:
```` to become one literal ` instead of two, ``n to become a linefeed, and similar.`" or `' produced a literal backtick and ended the string, instead of producing a literal quote mark, if the continuation section was enclosed in quotes of the same type and lacked the ` option.Optimized the automatic escaping of quote marks and backtick in continuation sections.
Fixed breakpoint_list (debugger) returning duplicates on lines containing fat arrow functions.
Fixed +BackgroundDefault failing to override the Gui's BackColor property.
Fixed bugs added by v2.1-alpha.3:
else{.static Prop { get => 1 }.Added function definition expressions.
Added typed properties (structures).
Added Class(Name, BaseClass, Args*) and Class(BaseClass, Args*) (see Class.Call).
Added support for left/right modifiers in {Blind}, as in {Blind>^}.
Changed remapping to utilize left/right modifiers in Blind; e.g. >^a::b remaps RCtrl-A to B and LCtrl-RCtrl-A to LCtrl-B, instead of just B.
Changed DllCall to permit CDecl to be omitted for all functions (see CDecl).
Revised parsing of statements. Global, local and static variable declarations with multiple initializers are now evaluated as one, so there is no need to step over each initializer individually while debugging.
Changed ListVars to show unset vars as "varname: unset".
Changed Throw to be a function, permitting thrown errors to be continuable (see Throw).
Changes applicable only to alpha users:
Changed (...)? and (...) ?? x to never enable unset return. This eliminates inconsistencies, such as:
(a ? b : c)? permitted only c to be unset, while (a ? b? : c)? permitted only b to be unset.(x.y)? permitted y to return unset, while (x?.y)? did not.Fixed a[b]:=unset for Array and Map.
Fixed debugger failing to return typed sub-properties.
Fixed a? .b.
Fixed f(a?.b?) incorrectly raising a load-time error.
Fixed MouseClickDrag to allow X1 and Y1 to be omitted.
Fixed mouse AltTab hotkeys not suppressing execution of a prefix hotkey, such as 1:: for 1 & WheelDown::AltTab. (Broken by v2.0.4)
Fixed hook hotkeys not recognizing modifiers which are pressed down by SendInput.
Fixed A_AhkPath to not be reliant on the case/format of the command line used to launch the process.
Fixed heap corruption during window searches involving groups. (Broken by v2.0.6)
Launcher
Fixed #Requires not being detected if followed by a comment other than ; prefer xxx. (Broken by v2.0.6)
Fixed syntax detection misinterpreting multi-line auto-replace hotstrings.
Window Spy
Changed font to Segoe UI size 9, consistent with Dash.
Fixed some ambiguity with COM calls, such as x.y acting as x.y().
Fixed breakpoint on control flow statement being "hit" when a fat arrow function on the line below it returns.
Fixed Default : to not merge with the line below it. This prevented Default : from being used at the end of a Switch block, and caused any subsequent line to take the line number of the Default.
Optimized ProcessGetPath, ProcessSetPriority and ProcessClose to not scan through all processes when given a valid PID, even if access to the process is denied.
Fixed inability of LWin::Alt to be used to activate some Alt key combos.
Fixed TypeError thrown by x is y to say "Class" rather than "Object".
Fixed WinTitle to support criteria longer than 1023 characters.
Fixed issues when &ref is used on different aliases of the same variable.
Fixed optional parameter default expressions (other than simple literal values) preventing the use of assume-global/assume-static.
Fixes
Fixed load-time checks not detecting missing parameters for MenuSelect.
Fixed popup menus popping under the active GUI window if it is AlwaysOnTop.
Optimizations
Optimized Pause to allow the OS-level thread to sleep until messages are received, instead of polling the pause state frequently. In testing, this reduced CPU usage from 0.04% to 0.00%.
Optimized ProcessWaitClose and RunWait to allow the OS-level thread to sleep until the process handle is signaled or messages are received. This reduced CPU usage (as above) and improved the response time.
Optimized dialog window class checks.
Changes
Changed ImageSearch and PixelSearch to allow X and Y to be omitted.
Changed ProcessWait to show "STILL WAITING" in ListLines, like WinWait.
Added support for returning unset from functions and properties, and allowing or handling it with the maybe (?) and or-maybe (??) operators.
Added optional chaining with the maybe operator (a?.b).
Added the maybe-assign operator (??=).
Changed property setters to allow the value parameter to be unset.
Improved load-time validation for unset, ? and ??.
Added an experimental directive, #DefaultReturn unset|"".
Fixed a memory leak caused by incorrect reference counting when an object is enumerated via COM. [PR# 325]
Fixed internal calls to __Enum to not call __Call.
Fixed error messages referring to parameter #65535.
Fixed incorrect IEnumVARIANT return count.
Fixed Download throwing OSError(0) when error should be non-zero.
Fixed LV.Add/Insert/Modify crashing when passed the minimum number of parameters.
Fixed stack traces to exclude calls to __new for Error subclasses.
Changed the Reload button on error/warning dialogs to explicitly close the dialog, even if the current script instance isn't terminated.
Removed an optimization for return var which caused the variable to appear blank when accessed within a finally block.
Fixed Default (Switch) to allow space before the colon.
Fixed Array.Prototype.RemoveAt to return the removed value when Length is "explicitly omitted" with unset or var?.
Fixed crashing when a ComObject is passed to a for-loop with only the second variable specified.
Changes merged from v1.1.37.00 and v1.1.37.01:
Changed COM method and property calls to pass large integers as VT_I8, not VT_R8 (floating-point), so the original type and precision is retained. Integers in the 32-bit range are still passed as VT_I4.
Added support for multi-variable enumerators (for-loops) with IDispatch-wrapped AutoHotkey objects. Both the script invoking the object and the object itself must be running a supported AutoHotkey version.
Fixed omitted parameters to receive their default values rather than the "optional argument marker" when an AutoHotkey method is called via IDispatch (COM). The reverse translation was already done when calling COM methods in previous versions.
Fixed VerCompare(a, ">" b) and reduced code size marginally.
Fixed AltTab-related load-time errors to be consistent with other errors.
Fixed errors thrown by a ComObject wrapper not being propagated correctly if it is called via an object/COM.
Fixed the Hotkey GUI control to allow setting the symbols ^, ! and + as hotkeys.
Fixed the Hotkey control to include modifiers when its value is set to a symbol.
Fixed potential misbehaviour of InputHook.KeyOpt() with single chars.
Fixed a bug with custom combos where a set of hotkeys like a & b::, a:: and a up:: would fail to suppress the release of a if a:: alone is disabled with #HotIf.
Fixed a bug where a key-down event is correctly suppressed by a hotkey, but sending an additional key-down with SendLevel > 0 would prevent the subsequent key-up from being suppressed, even if the sent event is ignored due to #InputLevel.
Fixed a & b up:: not suppressing b if a & b:: is present but disabled by #HotIf.
Fixed an issue with hotkeys not firing due to a race condition. If a modifier hotkey such as ~*RWin:: called Send or GetKeyState too soon, the OS could report that RWin isn't down, so the hook's modifier state would be "corrected" and hotkeys would wrongly fire or fail to fire. This was likely to occur only if another keyboard hook was installed more recently than the script's own hook, since in that case the OS would not update key state until the other hook's thread has resumed and returned.
Fixed hotstrings to use the Last Found Window set by #HotIf.
Fixed an issue where any attempt to reinstall the keyboard or mouse hook would fail if the OS had automatically uninstalled the hook. It is still necessary to meet certain conditions before any such attempt can be made.
Optimized allocation of cached COM property names for built-in IDispatch.
Refactored code to support a build configuration for AutoHotkey as a DLL.
Based on v2.0.3.
Improved RegExReplace with the ability to pass a callback function instead of replacement text, based on PR #307 by thqby.
Added WinGetEnabled.
Added WinGetAlwaysOnTop.
Added an optional Filename parameter to Edit.
Added the OnMessage method to the Gui class, based on code by thqby.
Added modeless menus.
Added ATan2(y, x). [PR #319 by sswwaagg]
Includes changes from the v1.1 branch:
Fixed Hotkey("a", "b") to use the original function of "b", not "a". [PR #318]
Fixed FileSetAttribute crash when used in a File Reading Loop. [PR #323]
Fixed duplicate Gui control name errors to correctly abort the thread.
Fixed DateTime/MonthCal Range option not applying minimum value.
Fixed s[x] => x and other single-line properties starting with "s".
Fixed a bug with deleting a breakpoint on a static line containing =>.
Fixed Button control not becoming default when clicked.
Fixed PixelSearch to unset X when pixel is not found.
Fixed hotstring with escape sequence causing next line to be skipped.
Fixed WinTitle ignoring character 1 when "ahk_" is at character 2.
Fixed remapping to utilize right-hand modifier already being down. For example, +x::+y will no longer release RShift to press LShift.
Changed error message for a == b && c() and similar cases to avoid alluding to legacy =.
Improved error message for some cases of unintended line continuation.
Fixed reserved words to be permitted as method names, as documented.
Fixed duplicate OnMessage calls for some keyboard messages.
Fixed inter-referenced closures being deleted prematurely.
Fixed SetFont to permit leading spaces in the Options parameter.
Fixed sending of {ASC nnnn}.
Fixed a.base := a to throw an error.
Fixed x.y := unset causing crashes or undefined behaviour.
Fixed GuiControl.Move() to be relative to the GUI's client area even when the GUI is not its parent.
Fixed Menu Add overwriting items which were appended by Menu Insert.
LauncherRun Dash instead of showing the old Welcome page in the documentation, when run without parameters.
Fixed version selection GUI raising an error if Enter is pressed without selecting a version. [PR UX/#4]
Suppress errors when checking whether an absent version can be downloaded.
Fixed absent version download prompt to not show the UAC shield if UAC is disabled.
Fixed issues with #Requires interpretation.
> >= < <= =).Fixed the default installation directory for command-line use.
Renamed the Start menu shortcut from "AutoHotkey" to "AutoHotkey Dash".
Fixed EnableUIAccess when running as SYSTEM.
Fixed EnableUIAccess to verify the private key when selecting a certificate.
DashFixed Launch Config GUI to update the "Run as administrator" and "Run with UI access" options.
Fixed Up/Down key handling in the Launch Config GUI.
Fixed Short DllCall arg type and undefined behaviour for invalid types.
Fixed (non-string) file version number for AutoHotkey binaries.
Fixed parameter type errors to show the correct parameter number.
Fixed Func.IsOptional(1) returning 0 in some cases where it shouldn't.
Fixed Gui event handler functions to not drop the Gui parameter when the Gui is its own event sink.
Fixed COM errors to not show "(null)" when no description is available.
Fixed ToolTips intermittently appearing at the wrong position.
Fixed __Enum(unset) to permit a second variable for Array, Match and Gui.
Fixed #include <> error messages to show "Script library" rather than "Function library".
Fixed new threads being unable to prevent a message check with Critical.
Optimized conversion of DllCall type names.
Made some trivial but effective code size optimizations.
For a history of changes prior to the v2.0.0 release, refer to the following (but note some changes were superseded):