Jump to content

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

v1.0.47 released: Stdlib, RegisterCallback, NumGet/Put


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

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]

toralf -nli
  • Guests
  • Last active:
  • Joined: --
Juuucheee. Thanks for the new release.

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005
Cool, a great release.
A little glitch: you linked to Functions.htm#lib, but created name Lib, it doesn't work in Firefox at least.
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

daonlyfreez
  • Members
  • 995 posts
  • Last active: Jan 23 2013 08:16 AM
  • Joined: 16 Mar 2005
Wow! 8)

Great work! Even though I might probably never use these features (they seem way over my head)... :wink:
Posted Image mirror 1mirror 2mirror 3ahk4.me • PM or Posted Image

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
The best release ever.

Now, I go to read docs...
Posted Image

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

you linked to Functions.htm#lib, but created name Lib, it doesn't work in Firefox at least.

Ah, so named anchors are case-sensitive. I've fixed that one and will keep keep it in mind for the future.

Thanks.

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012
While you're at it can you change the link on downloads as well, it's supposed to be #archives.
Great release ftw. :)

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
I changed #Archives to #archives on both the download page and on the "Other Downloads" page. Thanks for the correction.

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004
wow! big release Chris, congratulations!
now ahk has more stuff that i don't understand :p and i've more stuff on my to-understand list!

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


corrupt
  • Members
  • 2558 posts
  • Last active: Nov 01 2014 03:23 PM
  • Joined: 29 Dec 2004
Cool :) . Thanks Chris :) . It looks like the new functionality might fill in a lot of missing pieces for many projects :) .

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
We should all thank JGR mostly. Without his RegisterCallback(), this release would be much less interesting. :)

Thalon
  • Members
  • 641 posts
  • Last active: Jan 02 2017 12:17 PM
  • Joined: 12 Jul 2005
I love you chris! (not the body-way ^^ )
And of course JGR who opens up my mind for more DllCalls :)

Thalon

POINTS
  • Members
  • 290 posts
  • Last active: Oct 13 2010 02:12 AM
  • Joined: 17 Jan 2006
SendPlay is acting differently in the new version. Scripts that worked fine before now no longer do what they're supposed to. I haven't done much testing other than running the new version for 5 minutes and then rolling back to the old version...

Was SendPlay changed in this version?

The code looks something like this:

SendPlay, {enter}
SendRaw, %SomeRawString%
SendPlay, {enter}

It seems that these commands aren't being sent in order anymore.

Also, if someone knows a way to send an enter keystroke in raw string, this will be a non-issue for what I'm doing. (The other workaround would be to make a Raw String to regular string function converter.)
My AutoHotkey Program for Warcraft III:
Warkeys
http://warkeys.sourceforge.net/

Remap your hotkeys
Healthbars always on
Remap inventory

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

SendPlay is acting differently in the new version. Scripts that worked fine before now no longer do what they're supposed to. I haven't done much testing other than running the new version for 5 minutes and then rolling back to the old version...

Which old version? SendPlay and Send were not changed at all. I tested your script and it sends the keystrokes out of sequence in both 1.0.46.00 and 1.0.47.00. This is probably because the active window responds more quickly to SendPlay than to Send/SendRaw, so things can get out of order (especially with a KeyDelay of -1). This is probably related to the extra processing/buffering that the OS does for simultated keystrokes (Send/SendRaw) compared to SendPlay (SendPlay generates faster messages/events like ControlSend).

Also, if someone knows a way to send an enter keystroke in raw string, this will be a non-issue for what I'm doing. (The other workaround would be to make a Raw String to regular string function converter.)

Sending a raw linefeed (`n) seems to work.

POINTS
  • Members
  • 290 posts
  • Last active: Oct 13 2010 02:12 AM
  • Joined: 17 Jan 2006
Ok, I'll try this out tonight.
My AutoHotkey Program for Warcraft III:
Warkeys
http://warkeys.sourceforge.net/

Remap your hotkeys
Healthbars always on
Remap inventory