Mouse and keyboard macros and hotkeys.

Home | Download | Documentation | Support | Forum | Wiki

Changes and New Features

The changelog below pertains only to AutoHotkey Basic. For newer changes, see the AutoHotkey_L Changelog. - September 25, 2009

Fixed crash of SendMessage and PostMessage when wParam or lParam is omitted (broken by [thanks Lexikos] - September 25, 2009

Fixed StringSplit to work properly inside functions of compiled scripts (broken by [thanks engunneer & Lexikos]

Fixed SendPlay not to wait for the release of the Windows key prior to sending an "L" keystroke (broken by [thanks Lexikos]

Fixed A_EndChar to be valid when the B0 option is present, and to be empty when there is no ending character (broken by [thanks Al2000]

Fixed FormatTime to yield a valid time of day even when the specified month is out-of-range (broken by [thanks silveredge78]

Fixed FileCreateDir to support a leading backslash even when it is the only backslash; e.g. \dir. [thanks jaco0646]

Fixed GuiControl/GuiControlGet/Gui/SendMessage to work reliably even when they trigger a callback or OnMessage function. [thanks Lexikos]

Fixed RegExMatch() not to produce too few replacements when an empty-string match is followed by a non-empty-string match.

Changed "While()" to be recognized as a loop rather than a function. [thanks Crash&Burn]

Improved UrlDownloadToFile to support FTP and Gopher. [thanks Lexikos]

Improved the stdout/asterisk mode of FileAppend to write immediately rather than lazily to standard output. [thanks Lexikos]

Added full support for "if % expression". [thanks kenomby] - May 3, 2009

Fixed "ListLines On" not to erase the most recent log entry in the line history. [thanks Lexikos]

Fixed ListView to respond properly to mouse dragging when timers are running. [thanks Solar]

Fixed key-up hotkeys so that if one is created while its key is being held down, the release of the key doesn't trigger the wrong hotkey. [thanks Peter & engunneer] - April 19, 2009

Changed and fixed Gosub and GroupActivate so that when a function calls an external/public subroutine, that subroutine will treat all dynamic variables as globals, and will have outside-of-function GUI behavior. [thanks kenomby & Lexikos]

Improved performance of True/False/A_EventInfo in expressions by treating them as integers vs. strings. - April 15, 2009

Changed: For Windows Vista and later, hotkeys that include the Windows key (e.g. #a) will wait for LWin and RWin to be released before sending any text containing an "L" keystroke. This prevents such a hotkey from locking the PC. This behavior applies to all sending modes except SendPlay (which doesn't need it) and blind mode.

Fixed A_LoopFileExt to be blank for any filename having no extension but a period in its pathname. [thanks Yek-Toho-Tua].

Fixed the assignment of integers that are 19 or 20 characters long to work as they did prior to v1.0.48. [thanks Laszlo & Lexikos]

Fixed function definitions to work properly inside a block. [thanks rmarko]

Improved performance of A_Index in expressions by treating it as an integer rather than a string.

Improved performance of "if var [not] in/contains". [developed by Lexikos]

Improved ListLines with an option to turn line-logging Off or On. [thanks kenomby & ruespe]

1.0.48 - February 25, 2009

Compatibility: The change most likely to affect backward compatibility is that floating point numbers stored in variables now have higher precision. Scripts that rely on tiny differences in precision would either need to be reviewed and updated, or have their compatibility improved by using "SetFormat Float" (e.g. SetFormat, Float, 0.6) anywhere in the script. "SetFormat Float" disables the higher precision, but gives up some of the new, faster floating point performance.

Performance: The main theme of this release is faster performance. Almost all scripts should run faster -- especially those that make heavy use of expressions and integer math/comparisons (which may run up to three times as fast). To achieve the full benefit, a script either should avoid using SetFormat or should use SetFormat's fast mode.

Performance improvements

Expressions and function calls are compiled more heavily, making them much faster (especially complex integer expressions, including those with commas).

Binary numbers are cached for variables to avoid conversions to/from strings. This makes numerical operations involving variables much faster.

Literal integers in expressions and math/comparison commands are replaced with binary integers, which makes them faster; e.g. X+5 and "if x > 5".

LOOPs, IFs, and ELSEs that have blocks (braces) are faster due to skipping the opening '{'. A side-effect is that the '{' is omitted from ListLines.

Thread-creation performance is improved, which should help rapid-fire threads in OnMessage(), RegisterCallback(), and GUI events.

Changes that might affect existing scripts (other than higher-precision floating point described at the top)

When "SetFormat, Integer, Hex" is in effect, assigning a literal decimal integer to a variable also converts it to hex. Usually this is only a display issue.

For OnMessage() performance, the message number and HWND arrive as standard numbers rather than appearing unconditionally as hex. Usually this is only a display issue.

To achieve various improvements in performance, scripts now use slightly more memory (proportionate to the number of variables and expressions).

Changed and fixed "if var is time" and other uses of YYYYMMDDHHMISS date-time stamps to recognize that months outside the range 1-12 are invalid. [thanks Nick]

Changed and improved dynamic function calling to allow passing more parameters than defined by a function, in which case the parameters are evaluated but discarded. [developed by Lexikos]

Other improvements

Added function IsFunc(), which indicates whether a function may be called dynamically. [developed by Lexikos]

Added the while-loop, which repeats its commands until its expression evaluates to false. [developed by Lexikos]

Added an assume-static mode for functions. [developed by Lexikos]

Added built-in variables A_IsPaused and A_IsCritical. [developed by Lexikos]

Improved NumPut() to support UInt64 like DllCall(). [thanks Sean]

Improved mouse wheel support by adding WheelLeft and WheelRight as hotkeys and supporting them in Send, Click, and related commands. However, WheelLeft/Right has no effect on operating systems older than Windows Vista. [developed by Lexikos]

Upgraded compiled script compressor from UPX 3.00 to 3.03.


Fixed inability to use MsgBox's timeout parameter when the "Text" parameter had an expression containing commas.

Fixed "Menu, Delete, Item-that's-a-submenu" not to disrupt the associated submenu. [thanks animeaime & Lexikos]

Fixed the GUI Hotkey control to return usable hotkey names even for dead keys (e.g. "^" instead of Zircumflex). [thanks DerRaphael]

Fixed RegDelete so that it won't delete an entire root key when SubKey is blank. [thanks Icarus]

Fixed registry loops to support subkey names longer than 259 (rare). In prior versions, such subkeys would either be skipped or cause a crash. [thanks Krzysztof Sliwinski & Eggi]

Fixed FileSelectFolder by providing an option to make it compatible with BartPE/WinPE. [thanks markreflex]

Fixed window/control IDs (HWNDs), which in rare cases wrongly started with 0xFFFFFFFF instead of just 0x. [thanks Micahs]

Fixed inability of Send commands to use the Down/Up modifiers with the "}" character. [thanks neovars] - March 9, 2008

Fixed crash when a function was called concurrently with an optional ByRef parameter omitted by one thread but not omitted by the other. [thanks DeathByNukes]

Fixed "Menu, Tray, MainWindow" to enable the menu items in the main window's View menu. [thanks Lexikos]

Added dynamic function calling. [developed by Lexikos] - November 21, 2007

Fixed the Sort command: 1) fixed the "function" option not to misbehave when it's the last option in the list; 2) fixed the "unique" option so that when the delimiter is CRLF, the last item can be detected as a duplicate even when it doesn't end in CRLF; 3) fixed the "unique" option not to append a trailing delimiter when the last item is a duplicate. [thanks Roland]

Fixed RegExMatch() and RegExReplace() to yield correct results even when Haystack and OutputVar are both the same variable. [thanks Superfraggle]

Fixed inability to pass a parameter that is "a variable to which ClipboardAll has been assigned". [thanks Joy2DWorld & Lexikos]

Updated RegEx/PCRE from 7.0 to 7.4. For a summary of the major changes, see For full details of every change and fix, see

Added GUI control "Tab2" that fixes rare redrawing problems in the original "Tab" control (e.g. activating a GUI window by clicking on a control's scrollbar). The original Tab control is retained for backward compatibility because "Tab2" puts its tab control after its contained controls in the tab-key navigation order. [thanks Xander] - August 28, 2007

Fixed key-up hotkeys like "a up::" not to block the pressing of the "a" key unless the hotkey's #IfWin criteria are met. [thanks Roland]

Fixed Round(Var, NegativeNumber), which in rare cases was off by 1. [thanks Icarus]

Fixed crash of scripts that end in a syntax error consisting of an orphaned IF-statement (broken by [thanks msgbox of the German forum]

Eliminated the "GetClipboardData" error dialog. Instead, an empty string is retrieved when the data cannot be accessed within the #ClipboardTimeout period. [thanks ManaUser & Sean]

Changed GUI checkboxes and radio buttons to default to "no word-wrap" when no width, height, or CR/LF characters are specified. This solves display issues under certain unusual DPI settings. [thanks Boskoop] - August 1, 2007

Fixed expressions to allow literal negative hexadecimal numbers that end in "E"; e.g. fn(-0xe). [thanks Laszlo]

Fixed block syntax to allow a function-call immediately to the right of a '}'. [thanks Roland] - July 19, 2007

Fixed the Number option of Edit controls to properly display a balloon tip when the user types something other than a digit. [thanks tfcahm]

Fixed WM_TIMER not to be blocked unless it's posted to the script's main window. [thanks tfcahm]

Fixed wildcard hotkeys not to acquire tilde behavior when the same hotkey exists in the script with a tilde. [thanks Lexikos]

Fixed declaration initializers not to retain whitespace at the end of literal numbers. Also, they now allow spaces between a closing quote and the next comma. [thanks Hardeep] - July 8, 2007

Fixed RunAs not to crash or misbehave when a domain is specified. [thanks Markus Frohnmaier]

Changed relational operators to yield integers even when the inputs are floating point; e.g. 1.0 < 2.0 yields 1 vs. 1.0. [thanks Lexikos]

1.0.47 - June 19, 2007

Added support for function libraries, which allow a script to call a function in an external file without having to use #Include.

Added RegisterCallback(), which creates a machine-code address that when called, redirects the call to a function in the script. [developed by Jonathan Rennison (JGR)]

Added NumGet() and NumPut(), which retrieve/store binary numbers with much greater speed than Extract/InsertInteger.

Improved Sort with an option to do custom sorting according to the criteria in a callback function. [thanks Laszlo]

Improved OnMessage() with an option to allow more than one simultaneous thread. [thanks JGR]

Improved Critical with an option to change the message-check interval, which may improve reliability for some usages. [thanks Majkinetor and JGR]

Changed Critical to put SetBatchLines -1 into effect.

Changed the error messages produced by #ErrorStdOut to contain a space before the colon. [thanks Toralf]

Fixed OnMessage() functions that return one of their own local variables to return the number in that variable, not 0.

Fixed potential crashing of built-in variables that access the registry (e.g. A_AppData, A_Desktop, A_MyDocuments, A_ProgramFiles). [thanks Tekl] - May 31, 2007

Fixed A_UserName (broken by - May 30, 2007

Fixed "Gui, Tab, TabName" when used after a previous "Gui Tab". [thanks Toralf]

Improved SetTimer to treat negative periods as "run only once". [thanks Majkinetor]

Added "GuiControlGet Hwnd", which is a more modular/dynamic way to retrieve a control's HWND. [thanks Majkinetor]

Added built-in variables A_ThisLabel and A_ThisFunc, which contain the names of the currently-executing label/function. [thanks Titan & Majkinetor] - May 9, 2007

Fixed GuiControl, GuiControlGet, and "Gui ListView/TreeView" to support static variables and ByRefs that point to globals/statics. [thanks Peter]

Fixed FileInstall causing the Random command to become non-random in compiled scripts. [thanks Velocity]

Reduced the size of compiled scripts by about 16 KB due to UPX 3.0. [thanks to atnbueno for discovering the optimal command-line switches] - May 2, 2007

Added the "require administrator" flag to the installer to avoid a warning dialog on Windows Vista. [thanks Roussi Nikolov] - May 1, 2007

Fixed hotkeys like *x to fire even when x is also a hotkey that is prevented from firing due to #IfWin. [thanks Joy2DWorld & Engunneer]

Improved optional parameters to accept quoted/literal strings as default values.

Improved ByRef parameters with the ability to be optional (i.e. they may accept default values). [thanks Corrupt] - April 24, 2007

Fixed inability to recognize a literal scientific notation number that begins with 0, such as 0.15e+1. [thanks Laszlo] - April 23, 2007

Fixed inability to have a function-call as the first item in certain comma-separated expressions. [thanks Majkinetor]

Fixed WinTitles like "ahk_id %ControlHwnd%" in ControlGet's FindString/Choice/List, and Control's Add/Delete/Choose. [thanks Freighter & PhiLho]

Improved floating point support to recognize scientific notation; e.g. 1.2e-5 (the decimal point is mandatory). Also improved "SetFormat Float" with an option to output in scientific notation. [thanks Laszlo] - March 22, 2007

Fixed StringSplit inside assume-local functions so that it creates a local array even when OutputArray0 exists as a global but not a local. [thanks KZ]

Improved ListView's item-changed notification ("I") to indicate via ErrorLevel whether the item has been selected/deselected, focused/unfocused, and/or checked/unchecked. [thanks foom]

Added an additional layer of protection to compiled scripts. It is recommended that scripts containing sensitive data or source code be recompiled with the /NoDecompile switch. - March 4, 2007

Fixed ":=" deep inside expressions when used to assign the result of a recursive function to a local variable (broken by [thanks Laszlo]

Fixed inability to pass certain ternary expressions to ByRef parameters. [thanks Titan]

Fixed "GuiControlGet, OutputVar, Pos" so that it doesn't make the OutputVar blank. [thanks PhiLho]

Changed and fixed continuation sections so that the "Comment" option doesn't force the LTrim option into effect. [thanks Titan]

Changed the Terminal Server Awareness flag back to "disabled" on AutoHotkey.exe and compiled scripts. This improves flexibility and backward compatibility (see discussion at forum). - February 7, 2007

Fixed unreliability of ComSpec and environment variables on Windows 9x (broken by v1.0.46.07). [thanks Loriss]

Changed: When AutoHotkey.exe is launched without a script specified, it will now run (or prompt you to create) the file AutoHotkey.ahk in the My Documents folder. The only exception is when AutoHotkey.ini exists in the working directory, in which case it uses the old behavior of executing that file.

Improved DllCall to support an integer in place of the function name, which is interpreted as the address of the function to call. [thanks Sean] - January 23, 2007

Fixed crash of illegally-named dynamic variables on the left of an equal-sign assignment (broken by v1.0.45). [thanks PhiLho]

Fixed FileMoveDir's "Option 2" to work properly even when the directory is being both renamed and moved. [thanks bugmenot]

Fixed inability to pass a variable ByRef if that same expression changed it from empty to non-empty (when #NoEnv is absent). [thanks Joy2DWorld]

Changed DllCall's A_LastError to reflect only changes made by the script, not by AutoHotkey itself. [thanks Azerty] - January 16, 2007

Applied minor fixes and improvements to regular expressions by upgrading from PCRE 6.7 to 7.0. One of the most notable improvements is the `a option, which recognizes any type of newline (namely `r, `n, or `r`n). Similarly, the \R escape sequence means "any single newline of any type". See also: Full PCRE changelog

Changed and fixed all Control commands and StatusBarWait to obey SetTitleMatchMode RegEx as documented.

Changed RegExReplace() to return the original/unaltered string rather than "" when an error occurs.

Changed: Enabled the Terminal Server Awareness flag on AutoHotkey.exe and compiled scripts.

Improved performance when assigning large strings returned from user-defined functions. [thanks Laszlo] - January 4, 2007

Fixed the Input command to allow named end keys like {F9} to work even when the shift key is being held down (broken by v1.0.45). [thanks Halweg]

Fixed inability of "Gui Show" to focus the GUI window when the tray menu is used both to reload the script and to show the GUI window. [thanks Rnon]

Fixed inability to pass some types of assignments (:=) to a ByRef parameter. [thanks Laszlo] - January 2, 2007

Fixed inability to pass the result of an assignment (:=) to a ByRef parameter. [thanks Titan] - December 18, 2006

Fixed ListView's floating point sorting to produce the correct ordering. [thanks oldbrother/Goyyah/Laszlo] - December 17, 2006

Fixed environment variables to work properly as input variables in various commands such as StringLen and StringReplace (broken by [thanks Camarade_Tux] - December 15, 2006

NOTE: Although this release has been extensively tested, several low-level enhancements were made. If you have any mission-critical scripts, it is recommended that you retest them and/or wait a few weeks for any bugs to get fixed.

Fixed comma-separated declaration initializers such as "local x = 1, y = 2" to work even when immediately below an if/else/loop statement.

Fixed comma-separated expressions so when the leftmost item is an assignment, it will occur before the others rather than after. [thanks Laszlo]

Changed and fixed function-calls so that any changes they make to dynamic variable names, environment variables, and built-in variables (such as Clipboard) are always visible to subsequent parts of the expression that called them.

Changed: When a multi-statement comma is followed immediately by a variable and an equal sign, that equal sign is automatically treated as a := assignment. For example, all of the following are assignments: x:=1, y=2, a=b=c

Changed comma-separated expressions to produce the following effects: 1) the leftmost /= operator becomes true divide rather than EnvDiv; 2) blank values are not treated as zero in math expressions (thus they yield blank results).

Improved the performance of expressions by 5 to 20% (depending on type).

Improved the new assignment operators such as .= to support the Clipboard variable (even in comma-separated expressions).

Improved the .= operator so that it doesn't require a space to its left.

Improved GUI controls to accept static variables as their associated variables (formerly only globals were allowed).

Added option HwndOutputVar to "Gui Add", which stores a control's HWND in OutputVar. [thanks Corrupt & Toralf]

1.0.46 - November 29, 2006

NOTE: Although this release has been extensively tested and is not expected to break any existing scripts, several low-level enhancements were made. If you have any mission-critical scripts, it is recommended that you retest them and/or wait a few weeks for any bugs to get fixed.

Added function SubStr(), which retrieves the specified number of characters at the specified position in a string.

Added assignment operators //=, .=, |=, &=, ^=, >>=, and <<=, which can be used anywhere in expressions. For example, Var .= "abc" appends the string "abc" to Var's current contents.

Added full support in expressions for the operators :=, ++, --, +=, -=, *=, and /= (formerly, they could be used only as the leftmost operator on a line). All assignment operators (especially ++ and --) behave in a C-like way when their result is used by some other operator.

Added the ternary operator (?:), which is a shorthand replacement for the if-else statement. For example, var := x>y ? 2 : 3 assigns the value 2 if x is greater than y; otherwise it assigns 3.

Added support for comma-separated expressions, which allow a single line to contain multiple assignments, function calls, and other expressions. [thanks PhiLho & Titan]

Improved variable declarations to support initialization on the same line. Note: A static variable's initialization occurs only once, before the script begins executing.

Improved line continuation to support all expression operators. For example, a line that starts with "?" or "+" is automatically appended to the line above it.

Improved performance of operators "." and ".=" to be as fast as the percent-sign method of appending a string.

Improved expressions to allow more types of consecutive unary operators such as !!Var. [thanks Laszlo]

Changed Critical to check messages less often (20 vs. 10ms), which improves the reliability of frequently-called OnMessage functions. [thanks Majkinetor]

Changed: A variable named simply "?" is no longer valid in expressions due to the new ternary operator.

Fixed hotkeys to support ":::" (colon as a hotkey) and ": & x" (colon as a hotkey prefix).

Fixed the installer to remove psapi.dll from the AutoHotkey folder (except on Windows NT4). This avoids a conflict with Internet Explorer 7. [thanks to all who reported it] - November 15, 2006

Fixed crash on Windows 9x when a script doesn't actually run (e.g. due to syntax error) (broken by v1.0.45). [thanks rogerg]

Changed "Control Style|ExStyle" to report ErrorLevel 0 vs. 1 when the requested style change wasn't necessary because it was already in effect.

Improved #Include to support %A_AppData% and %A_AppDataCommon%. [thanks Tekl] - November 12, 2006

Fixed file-pattern loops not to crash when recursing into paths longer than 259 characters. In addition, such paths and files are now ignored (skipped over) by file-pattern loops, FileSetAttrib, and FileSetTime. [thanks PhilR]

Fixed functions that call themselves and assign the result to one of their own locals (broken by v1.0.45). [thanks bjennings]

Fixed crash of scripts containing regular expressions that have compile errors. [thanks PhiLho]

Fixed GuiControl not to convert checkboxes into 3-state unless requested. [thanks JBensimon]

Changed UrlDownloadToFile to announce a user-agent of "AutoHotkey" to the server rather than a blank string. [thanks jaco0646]

Improved continuation sections to support semicolon comments inside the section via the option-word Comments. - November 8, 2006

Fixed StringUpper and StringLower to work when OutputVar is the clipboard (broken by v1.0.45). [thanks songsoverruins]

Fixed the hotkeys ~Alt, ~Control, and ~Shift to fire upon press-down rather than release (broken by v1.0.44).
Background: Without the tilde, Alt/Control/Shift fire upon release to avoid taking over both the left and right key. But a specific left/right hotkey like LAlt or RShift fires upon press-down. - November 7, 2006

Fixed FileReadLine and FileSelectFile not to crash or misbehave when other threads interrupt them (broken by v1.0.45). [thanks toralf]

Fixed RegExMatch() so that when there's no match, named subpatterns are properly set to "" in the output array. [thanks PhiLho]

Fixed RegExMatch()'s "J" option to properly write duplicate named subpatterns to the output array. [thanks PhiLho]

Changed SetWorkingDir and #Include DirName to succeed even for a root directory such as C: that lacks a backslash.

Improved DllCall() to display a warning dialog if the called function writes to a variable of zero capacity.

1.0.45 - November 4, 2006

NOTE: Although this release has been extensively tested and is not expected to break any existing scripts, several low-level performance enhancements were made. If you have any mission-critical scripts, it is recommended that you retest them and/or wait a few weeks for any bugs to get fixed.

Added support for regular expressions via RegExMatch(), RegExReplace(), and SetTitleMatchMode RegEx. [thanks Philip Hazel & PhiLho]

Improved performance and memory utilization of StringReplace.

Improved performance of the := operator for expressions and functions involving long strings.

Improved ControlClick with a new option "NA" that avoids activating the target window (this mode also improves reliability in some cases). In addition, it's been documented that SetControlDelay -1 can improve the reliability of ControlClick in some cases. [thanks nnesori]

Changed GUI buttons to default to "no word-wrap" when no width, height, or CR/LF characters were specified. This may solve button display issues under some desktop themes.

Fixed "Transform HTML" for the following characters: &`n><

Fixed misinterpretation of lines starting with "if not is" such as "if not IsDone".

Fixed inability of "Gui Show" to move a window vertically downward to where its bottommost row of pixels is now.

Fixed inability to use GroupActivate as the only line beneath an IF or ELSE.

Fixed inability of the Input command to differentiate between end-keys enclosed in braces and their (un)shifted counterparts; e.g. '{' vs. '['. [thanks Laszlo] - October 2, 2006

NOTE: Although this release has been extensively tested and is not expected to break any existing scripts, several low-level performance enhancements were made. If you have any mission-critical scripts, it is recommended that you retest them and/or wait a few weeks for any bugs to get fixed.

Fixed loop-variables like A_Index when accessed in more than one of a line's parameters. The inaccuracy occurred only when one of those parameters called a function that returned directly from the body of a loop. [thanks NumEric]

Changed ListVars to display ByRef parameters by their own name rather than the caller's.

Changed the Input command to do nothing on Windows 9x (not even setting ErrorLevel and OutputVar).

Raised the limit on the number of GUI fonts from 100 to 200. [thanks philou]

Changed StrLen()/StringLen and internal string-handling to avoid calculating a string's length when possible. Although this enhances performance (especially for large strings), scripts that use DllCall to pass a string via the address operator (&) rather than as a str parameter should call VarSetCapacity(Var, -1) to correct the internally-stored length (if it changed).

Improved performance slightly (above and beyond the StrLen improvement). - September 20, 2006

Fixed ControlGetPos and ControlMove to work with "ahk_id %ControlHWND%". [thanks Hardeep]

Fixed #CommentFlag to affect the line beneath it the same way as other lines. [thanks PhiLho]

Changed A_OSVersion to report Windows Vista as "WIN_VISTA" rather than "".

Added options to set min/max size of GUI windows; for example: Gui +MinSize320x240 +MaxSize640x480 - September 13, 2006

Fixed timers interfering with double-clicks in FileSelectFile. [thanks DJAnonimo]

Fixed mouse hook causing a delay when pressing a GUI window's title bar buttons. [thanks Tekl]

Improved GUI windows to have CS_DBLCLKS so that OnMessage() can monitor double clicks via WM_LBUTTONDBLCLK, WM_RBUTTONDBLCLK, and WM_MBUTTONDBLCLK. [thanks Hardeep]

Improved ListViews to support logical sorting, which treats digits as numbers rather than mere characters. [thanks Tekl & Hacker] - September 9, 2006

Fixed FileSelectFolder and TreeView to respond properly to mouse clicks when timers are running.

Fixed inability of OnMessage() to consistently monitor certain messages such as WM_NOTIFY. [thanks numEric]

Fixed inability of literal/quoted strings to contain `%.

Fixed continuation sections to support #EscapeChar, #DerefChar, and #Delimiter. [thanks Laszlo]

Changed GroupBox to default to "no word-wrapping". This can be overridden via +Wrap.

Changed/improved the ** operator and "Transform Pow" to support negative bases when the exponent isn't fractional. [thanks Laszlo]

Improved GUI responsiveness during UrlDownloadToFile (especially for slow downloads). - August 27, 2006

Fixed OnMessage() when called from inside a monitor function for the purpose of disabling some other monitor. [thanks Hardeep]

Changed/fixed ImageSearch's TransN option to use RGB vs. BGR as documented. [thanks Tom Lorimor]

Changed the installer to omit the "Run" verb for .ahk files. The "Open" verb is now the default (with a new display-name of "Run Script"). [thanks numEric] - August 9, 2006

Fixed hook hotkeys like $^b not to fire twice when a similar, key-up hotkey exists (like "#b up" ). [thanks Newbie]

Fixed one too many backspaces in asterisk hotstrings whose next-to-last character is a dead key. [thanks Henrique]

Fixed "Gui Color" to work after the background color was previously changed to "default". [thanks Hardeep]

Changed "if var is xdigit" to tolerate a 0x prefix. [thanks Titan]

Added command "Gui +LabelMyGui" to support custom label names (e.g. "MyGuiClose" instead of "2GuiClose"). This also allows multiple GUI windows to share the same set of labels. [thanks Tekl] - July 25, 2006

Fixed "Gui Show" not to unmaximize a window unless the options require it. [thanks foom]

Fixed GuiControl's +/-Left/Right for buttons, checkboxes, and radios. [thanks Hardeep]

Fixed UpDown creation to widen its buddy only when the buddy had no explicit width. [thanks Thalon]

Improved MsgBox/IfMsgBox to support Cancel/Try Again/Continue, as well as a Help button. [thanks jballi] - June 17, 2006

Fixed stack overflow when a registry-loop traverses deeply nested subkeys. [thanks Eggi]

Fixed Hotkey command to report ErrorLevel 0 vs. 51 upon success for joystick hotkeys. [thanks Roland]

Changed ClipboardAll to exclude formats that cause Outlook's MS Word editor to display error dialogs. [thanks deanhill1971]

Changed and improved UrlDownloadToFile to retrieve the file from the remote server vs. the cache. There is a new option to override this. [thanks olfen]

Improved remapping to support destination characters that don't exist on the keyboard (such as F1::ð in English). [thanks DavidT] - June 8, 2006

Fixed remapping-to-modifier such as F1::Control (broken by v1.0.44.05). [thanks formarx] - June 7, 2006

Fixed mouse movement being off by 1 pixel for coordinates very near 0 (broken by v1.0.43). [thanks numEric]

Changed and improved remapping-to-modifier (such as F1::Control) to release the modifier during the script's other uses of Send. - May 31, 2006

Fixed double-colon warning dialog appearing upon launch of certain scripts. (broken by v1.0.44.03)

Fixed combination hotkeys like "a & b" to work even if "b & a" and "b & a up" are also present.

Fixed buddyless UpDown controls to work even if a StatusBar is present. [thanks Titan] - May 29, 2006

Fixed FileExist() to report "X" rather than "" for files whose attributes are all undefined. [thanks Peter]

Fixed Tab controls so that the first Text control added to a new page is auto-positioned correctly even if the previously added control was a Text control on some other page.

Fixed ImageSearch so that a transparent color like TransBlack is as effective in variation mode as non-variation mode. [thanks Troz]

Fixed GetKeyState and KeyWait to accept characters that don't exist in the current keyboard layout (in case the keyboard layout changes after launching the script).

Fixed hotkeys that don't exist in the current keyboard layout (such as ^!ä:: in English) to display a warning and end the auto-execute section. [thanks Androgen Belkin]

Changed and improved ControlSend, Send, Hotstrings, Input, and AltGr handling to use the target window's language rather than the script's. If you use only one keyboard layout on your system, this should not affect anything. [thanks Androgen Belkin]

Improved VarSetCapacity() to interpret a capacity of -1 as "update this variable's internally-stored length". This is useful in cases where a variable has been altered indirectly, such as by passing its address via DllCall(). - May 20, 2006

Fixed hotkeys that use "&" and "~" together (e.g. ~a & b and ~LButton & RButton) (broken by v1.0.44). [thanks SlimlinE & Spike] - May 15, 2006

Fixed StatusBar's grabbing of UpDowns that are added after it. [thanks Tekl]

Changed Round() to display exactly N decimal places rather than obeying SetFormat.

1.0.44 - May 14, 2006

Fixed OnClipboardChange to work even when the script is displaying a MsgBox or other dialog.

Fixed FileCreateDir not to report ErrorLevel 1 when the specified directory ends in "\". [thanks Wesley]

Fixed hotkeys Control::, Shift::, and Alt:: to fire on release of the key rather than press-down (broken by v1.0.41).

Fixed loading of icon #1 from nonstandard file types such as .bin.

Fixed ListView creation to obey the text color set by "Gui Font".

Changed and fixed the hotkey tilde prefix (~) so that hotkeys like ~Esc and Esc are considered duplicates; that is, a script cannot define both ~Esc and Esc unless they are under different #IfWin criteria (in which case ~Esc and Esc have been fixed to work properly). [thanks jballi]

Changed and improved ListViews: 1) a new option WantF2 is in effect by default, which causes an F2 keystroke to edit the current row (when not ReadOnly); 2) added LV_Modify(Row, "Vis") to scroll an item into view; 3) drag notifications occur even without AltSubmit; 4) item-change notifications have A_EventInfo set to the row number; 5) ErrorLevel no longer mirrors A_EventInfo in cases where it was never documented to do so (same for GuiContextMenu).

Improved Edit controls to select all text in response to Control-A. This can be disabled via -WantCtrlA.

Added new GUI control types TreeView and StatusBar. - May 1, 2006

Fixed %A_WorkingDir% on Windows 9x, which was sometimes blank. [thanks Points]

Improved BlockInput with a new mode that blocks only physical movement of the mouse, not keystrokes or mouse clicks. - April 28, 2006

Improved PixelGetColor with two alternate modes that work in a broader variety of windows and full-screen apps. [thanks TDMedia]

Improved StringMid to allow "Count" to be omitted to retrieve all characters. [thanks]

Improved FileSelectFile to support special folders such as My Computer via CLSID strings (FileSelectFolder and Run already support them). - April 25, 2006

Fixed SendInput not to revert to SendEvent merely because another script has a mouse hook. Only another keyboard hook should do that. [thanks baby-luck]

Fixed LV_GetCount() to work even if the "C" in its name is lowercase.

Changed FileSelectFile to navigate/follow shortcuts (.lnk files) rather than selecting them. There is also a new option to override this. [thanks Veovis & PhiLho]

Added "Gui +LastFoundExist" to detect the existence of a GUI window. [thanks Tekl & Evl]

Added built-in variables A_AppData, A_AppDataCommon, and A_Temp (A_Temp is the folder designated to hold temporary files). - April 17, 2006

Changed SendInput to use "SetKeyDelay -1, 0" when it reverts to SendEvent mode (unless SendEvent's KeyDelay "-1,-1", in which case "-1,-1" is used).

Added directive #NoEnv, which is recommended for all new scripts because:

  1. It significantly improves performance whenever empty variables are used in an expression or command. It also improves DllCall's performance when unquoted parameter types are used (e.g. int vs. "int").
  2. It prevents script bugs caused by environment variables whose names unexpectedly match variables used by the script.
  3. A future version of AutoHotkey such as 1.1 might make this behavior the default (though such a change is not expected for at least a year).

Added built-in variables ComSpec and ProgramFiles to ease the transition to #NoEnv.

Added command EnvGet, which retrieves an environment variable. - April 12, 2006

Fixed inability of "Menu, Tray, Icon" to load icon #1 from file types cpl/scr/drv/ocx/vbx/acm/bpl (broken by v1.0.43.03). Similarly, all icon-capable features have been improved to support these file types. [thanks Winkie & PhiLho]

Fixed the following legacy commands to accept function-calls containing commas: EnvAdd/Sub, LeftClick(Drag), RightClick(Drag). [thanks Titan] - April 9, 2006

Changed ahk_id to operate directly on the specified HWND when it's a control (child). Previously, it operated upon the topmost sub-control if that control had any sub-controls.

Improved Post/SendMessage to fully support strings put into address variables by the receiver (e.g. PostMessage, Msg, &MyVar).

Improved support for control HWND as an alternative to control ClassNN: 1) Added a MouseGetPos option to retrieve control HWND; 2) Added "WinGet ControlListHwnd" to retrieve a list of control HWNDs; 3) Added "ControlGet Hwnd" to retrieve the HWND that corresponds to a control's ClassNN or text.

Added "GuiControlGet FocusV", which gets the focused control's variable name rather than its ClassNN. - April 7, 2006

Fixed and improved support for .ICL files (icon libraries), which was broken by v1.0.43.03. [thanks Tekl]

Changed case sensitivity in hotkey names back to pre- behavior: high ANSI letters like Ä and Ü are treated as different hotkeys than their lowercase counterparts. [thanks copa017] - April 4, 2006

Fixed crash of characters above Chr(127) in hotstring abbreviations and the locale-search-from-right mode of InStr() and StringGetPos (broken by v1.0.43.03). [thanks PhiLho & brotherS] - April 3, 2006

Fixed distortion of 16x16 icons loaded via ahk2exe or Menu, Tray, Icon. [thanks Tekl]

Fixed the following to ignore #MaxMem as documented: VarSetCapacity(), FileRead, ClipboardAll, and ControlGet (ListView). [thanks Dippy46]

Changed the following to use locale case insensitivity vs. "A-Z only" insensitivity: hotkey names, hotstring abbreviations, menu names, Input's MatchList, and Gui Tab.

Changed the expression equal operator (=) and the case-insensitive InStr() to use locale case insensitivity when StringCaseSense is Locale or On.

Improved StringCaseSense with a new option Locale that makes string comparisons case insensitive according to the rules of the current user's locale. For example, most English and Western European locales treat the letters A-Z and ANSI letters like Ä and Ü as identical to their lowercase counterparts. [thanks Boskoop & PhiLho]

Improved the Sort command and ListView sorting with a locale-case-insensitive option.

Improved mouse wheel hotkeys (WheelDown/Up) to report the number of wheel turns in A_EventInfo, which allows distinguishing between fast and slow wheel movement. [thanks evl]

Improved FileRead with an option to read only the leading part of a file. [thanks Dippy46] - March 30, 2006

Fixed raw-mode hotstrings not to send the extra string {Raw} (broken by v1.0.43). [thanks stom2006]

Changed SendMode: 1) renamed InputThenEvent to Input; 2) added InputThenPlay, which is the same behavior as the former "Input". This was done because SendEvent is less likely to cause compatibility problems than SendPlay. - March 29, 2006

Fixed mouse clicking at unspecified coordinates in particular apps; e.g. Send {LButton} (broken by v1.0.43). [thanks incith]

Fixed tilde hotkeys so that if they remove a hook, their own key doesn't get stuck down (e.g. Mouse Gestures script and ~LCtrl::Hotkey, RButton, Off). [thanks Stefan Taubenberger]

1.0.43 - March 25, 2006

NOTE: Although this release has been extensively tested and is not expected to break any existing scripts, several changes were made to the sending of keystrokes and mouse clicks. If you have any mission-critical scripts that rely on such features, it is recommended that they be re-tested or that you wait two weeks for any bugs to get fixed.

Fixed AltGr hotkeys that use Send, such as <^>!m::Send ^c. Also fixed AltGr remappings such as F1::RAlt [thanks foxer]

Fixed inability of VarSetCapacity to free the memory of a ByRef parameter. [thanks Corrupt]

Fixed hotstring option b0 to show the ending character where you typed it rather than at the end of the replacement.

Improved the speed and reliability of auto-replace hotstrings by defaulting them to SendInput mode. There is also a new hotstring option to change the sending mode.

Improved the reliability of mouse clicks/drags in cases where the user is physically moving the mouse during the event.

Added commands Click and Send {Click}, which are easier to use than MouseClick. They also compensate if the left/right mouse buttons have been swapped via the control panel.

Added command SendMode, which makes Send synonymous with SendInput or SendPlay rather than the default (SendEvent). It also makes Click and MouseMove/Click/Drag use the specified method.

Added two new methods for sending keystrokes and mouse clicks: SendInput and SendPlay. These are generally faster and more reliable. Also, SendPlay allows keystrokes and hotstrings to be accepted by a broader variety of games. - March 9, 2006

Fixed crash of functions that recursively pass ByRef parameters. [thanks PhiLho] - March 7, 2006

Fixed crash of A_ScriptDir (broken by v1.0.42.01).

Fixed Run/RunWait's passing of an extra space character at the end of the parameter list when launching shortcuts. [thanks arbe] - March 6, 2006

This is functionally identical to the previous release, whose EXE and BIN were about 1% larger than they should have been due to a compiler quirk. - March 6, 2006

Fixed ClipboardAll when used with apps such as Word and Excel (broken by previous version). [thanks Roussi Nikolov]

Fixed ClipboardAll to prevent appearance of bookmarks in MS Word. [thanks Laszlo & 02clams]

Fixed A_TimeIdlePhysical being disrupted by simulated AltGr keystrokes. [thanks skrommel]

Fixed Send {Blind} causing sticking Win/Ctrl/Alt/Shift when the user released such a key in the middle of a Send.

Improved the Send command not to press and release the shift key after each uppercase letter (e.g. Send ABC).

Improved SoundSet/Get to support ComponentType "Headphones". [thanks Tobias Winkler] - February 20, 2006

Fixed crash of WinActivate in certain rare circumstances. [thanks twhyman]

Changed hotstrings to require the mouse hook by default (see next item). This can be prevented via #Hotstring NoMouse.

Improved hotstrings to take into account mouse clicks. This allows a hotstring to fire when the user's click focuses a new control or moves the caret.

Improved the Random command with a means to set a new seed. [thanks Laszlo]

Improved #ClipboardTimeout to reattempt data reading when the first attempt fails. Previously, only the opening of the clipboard was reattempted.

Added built-in variable A_LastError for DllCall and Run/RunWait. It contains the result from the OS's GetLastError(). - February 17, 2006

Fixed UpDown controls to snap onto the right control when inside a Tab control that contains a ListView. [thanks Thalon]

Improved the Hotkey command with an "Off" option (typically used to create a hotkey in an initially-disabled state).

Improved A_Cursor not to interfere with double-clicking. [thanks Shimanov] - February 15, 2006

Fixed the following variables to work correctly when concatenated onto other strings: A_DetectHiddenWindows, A_DetectHiddenText, A_AutoTrim, and A_StringCaseSense. [thanks jballi]

Fixed KeyWait and GetKeyState in the subroutines of hook hotkeys (broken by v1.0.39) [thanks Laszlo & TobStro]. For example:

if not GetKeyState("LControl")
    ToolTip LControl is not down as expected (this bug affected some systems but not others).

1.0.42 - February 10, 2006

Fixed expressions such as "If not Installed" not to be misinterpreted as "If not in List". [thanks Toralf]

Fixed certain unusual situations where a hotkey would unnecessarily require the keyboard hook.

Fixed vkNNN hotkeys to be handled by the hook when that VK is also used as a prefix for other hotkeys.

Fixed #IfWin's automatic disabling of prefix keys to work properly when Suspend is ON.

Fixed minor hotkey issues on Windows 95/98/Me: 1) The wildcard prefix (*) is ignored and such hotkeys are put into effect rather than being disabled; 2) Non-wildcard hotkeys that are a subset of a wildcard hotkey are put into effect rather than being disabled; 3) A left/right hotkey such as >#x is put into effect as Win-X rather than simply "X".

Changed the Hotkey command to create a new variant (when appropriate) rather than always updating any existing hotkey of that name. This only affects scripts that use v1.0.41's #IfWin directive.

Changed hotkeys to recognize ^!c as being the same as !^c (different symbol order). This also affects the Hotkey command.

Improved the Hotkey command to support UseErrorLevel and context-sensitive hotkeys (via "Hotkey IfWinActive/Exist").

Improved #IfWinActive/Exist to support Windows 9x. In addition, the keyboard hook is now avoided whenever possible. Finally, #IfWin now sets the Last Found Window.

Improved the following commands to support TListBox/TComboBox and possibly others: Control (Add/Delete/Choose/ChooseString); and ControlGet (FindString/Choice/List).

Added support for hotkey and hotstring variants (duplicates). Such hotkeys perform a different action (or none at all) depending on the type of window that is active or exists. - February 1, 2006

Changed "GuiControl Move" to reduce flickering when resizing or moving controls [thanks Serenity]. However, this may cause painting artifacts for some control types under certain circumstances. If so, please update your scripts to use GuiControl MoveDraw instead. - January 31, 2006

Fixed AltGr hotkeys that send AltGr characters such as "<^>!a::Send \" in German. [thanks AGU]

Fixed Gui +Disable/AlwaysOnTop to work even if other options are present on the same line. [thanks evl]

Improved syntax to support having a command on the same line as an open-brace. [thanks segfault]

1.0.41 - January 19, 2006

Fixed "Transform HTML", which was broken by v1.0.40.02. [thanks Rabiator]

Improved syntax to support One True Brace (OTB) style with IFs, ELSEs, functions, and normal loops.

Added built-in variable A_AhkPath, which contains the full path and name of AutoHotkey.exe (if available).

Added directives #IfWinActive/Exist to make selected hotkeys and hotstrings active only in the windows you specify. - January 11, 2006

Fixed memory leak when GuiControl loaded some types of images into a Picture control. [thanks beardboy]

Fixed inability of ToolTip to reappear after it was destroyed externally via Alt-F4, WinClose, etc


Changes in 2005  |  Changes in 2004/2003  |  Pending Changes  |  Wish List Forum

Home | Download | Documentation | Support | Forum | Wiki