存档变更

AutoHotkey

存档变更

这个页面包含了由Chris Mallett开发的原始AutoHotkey分支的变更历史。

对于最近的更新,请参阅变更和新功能

1.0.48.05 - September 25, 2009

Fixed crash of SendMessage and PostMessage when wParam or lParam is omitted (broken by 1.0.48.04). [thanks Lexikos]

1.0.48.04 - September 25, 2009

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

Fixed SendPlay not to wait for the release of the Windows key prior to sending an "L" keystroke (broken by 1.0.48.01). [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 1.0.44.09). [thanks Al2000]

Fixed FormatTime to yield a valid time of day even when the specified month is out-of-range (broken by 1.0.48.00). [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]

1.0.48.03 - 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]

1.0.48.02 - 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.

1.0.48.01 - 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.

Fixes

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]

1.0.47.06 - 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]

1.0.47.05 - 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 www.pcre.org/news.txt. For full details of every change and fix, see www.pcre.org/changelog.txt.

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]

1.0.47.04 - 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 1.0.47.00). [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]

1.0.47.03 - 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]

1.0.47.02 - 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]

1.0.47.01 - 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]

1.0.46.17 - May 31, 2007

Fixed A_UserName (broken by 1.0.46.16).

1.0.46.16 - 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]

1.0.46.15 - 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]

1.0.46.14 - May 2, 2007

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

1.0.46.13 - 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]

1.0.46.12 - April 24, 2007

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

1.0.46.11 - 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]

1.0.46.10 - 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.

1.0.46.09 - March 4, 2007

Fixed := deep inside expressions when used to assign the result of a recursive function to a local variable (broken by 1.0.46.06). [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).

1.0.46.08 - 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]

1.0.46.07 - 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]

1.0.46.06 - 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]

1.0.46.05 - 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]

1.0.46.04 - January 2, 2007

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

1.0.46.03 - December 18, 2006

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

1.0.46.02 - December 17, 2006

Fixed environment variables to work properly as input variables in various commands such as StringLen and StringReplace (broken by 1.0.44.14). [thanks Camarade_Tux]

1.0.46.01 - 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]

1.0.45.04 - 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]

1.0.45.03 - 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.

1.0.45.02 - 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.

1.0.45.01 - 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]

Visit www.autohotkey.com/changelog/ for even older changes.