Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

v1.0.48 released: Runs up to 3x as fast. Adds while-loop.


  • Please log in to reply
39 replies to this topic
Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Here are the changes for v1.0.48:

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]

SoggyDog
  • Members
  • 803 posts
  • Last active: Mar 04 2013 06:27 AM
  • Joined: 02 May 2006
Yea!

jaco0646
  • Moderators
  • 3165 posts
  • Last active: Apr 01 2014 01:46 AM
  • Joined: 07 Oct 2006
Ditto!

Edit: Is there a reason for the different syntax style of the While-Loop, as opposed to
Loop, While, Expression
...like the other loop commands?

Krogdor
  • Members
  • 1391 posts
  • Last active: Jun 08 2011 05:31 AM
  • Joined: 18 Apr 2008
Great job, Chris! Not only a speed update but also quite a few good features from Lexikos' branch of AHK.

The only other thing from Lexikos' that I wish was in this one is the #If hotkey modifier, but it's still very nice to see an official update :D

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

Is there a reason for the different syntax style of the While-Loop, as opposed to

Loop, While, Expression
...like the other loop commands?

The main reason is that a simple While is used in many other languages, which cuts down the learning curve when going to or coming from other languages.

The only other thing from Lexikos' that I wish was in this one is the #If hotkey modifier, but it's still very nice to see an official update :D

Hopefully that and some of the other features will be added in the next major release, or maybe a sooner, minor one.

tank
  • Administrators
  • 4345 posts
  • AutoHotkey Foundation
  • Last active: May 02 2019 09:16 PM
  • Joined: 21 Dec 2007

Edit: Is there a reason for the different syntax style of the While-Loop, as opposed to

Loop, While, Expression
...like the other loop commands?

Actually i find this more apporpriate
than
Loop, While, Expression
Tho i can see how your suggestion fits the rest of the ahk syntax scheme more.
but the
While Expression
syntax feels more natural comming from other languages
Never lose.
WIN or LEARN.

corrupt
  • Members
  • 2558 posts
  • Last active: Nov 01 2014 03:23 PM
  • Joined: 29 Dec 2004
Thanks :) Time to play...

fincs
  • Moderators
  • 1662 posts
  • Last active:
  • Joined: 05 May 2007
Finally! :p :p :p

:D :) :shock: :p :O :lol:

A lot of emotions are running through my nerves!

Sean
  • Members
  • 2462 posts
  • Last active: Feb 07 2012 04:00 AM
  • Joined: 12 Feb 2007
Long awaited! All my scripts are now fully functional with the new build.

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006
Thanks Chris. I've brought AutoHotkey_L in line with the new version. :)

toralf
  • Moderators
  • 4035 posts
  • Last active: Aug 20 2014 04:23 PM
  • Joined: 31 Jan 2005
Thank you Chris and Lexikos, much appreciated.
Ciao
toralf
 
I use the latest AHK version (1.1.15+)
Please ask questions in forum on ahkscript.org. Why?
For online reference please use these Docs.

AnAHKUser
  • Members
  • 32 posts
  • Last active: Aug 12 2013 10:12 PM
  • Joined: 05 Feb 2007
Thank you! Much appreciated :D

Icarus
  • Members
  • 851 posts
  • Last active: Jan 02 2012 11:17 AM
  • Joined: 24 Nov 2005
Chris,

Thanks a lot for this release and thanks for implementing the RegDelete fix.
I can sleep a little better now.

Even though I am not following the Lexikos branch, it is obvious that it has great contribution to the official build as well - so thanks a lot for that Lexikos.

AHK forever. (t-shirt? :) )
Sector-Seven - Freeware tools built with AutoHotkey

David Andersen
  • Members
  • 140 posts
  • Last active: Jun 28 2011 04:54 PM
  • Joined: 15 Jul 2005
Great work Chris and Lexikos! Big thanks also to Sean, Nick, Icarus, DerRaphael, Animeaime, Markreflex, Krzysztof Sliwinski, Eggi, Micahs and Neovars for contributing!

Tuncay
  • Members
  • 1945 posts
  • Last active: Feb 08 2015 03:49 PM
  • Joined: 07 Nov 2006
Thanks Chris, thats a great update. And thank you to Lexikos, who has developed some of the new elements like While Expression.