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
POINTS not logged in
  • Guests
  • Last active:
  • Joined: --

Ok, I'll try this out tonight.


It's working now... It was just some fluke that I attributed to the new version :(

What the script is actually doing is this:
SendPlay, +{Enter}
SendPlay, {Raw}%strMessage%
SendPlay, {Enter}

Which should be ok. Works 99.9% of the time.

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006

I love you chris! (not the body-way ^^ )

Are you sure its not the body-way ? :p 8)
Posted Image

corrupt
  • Members
  • 2558 posts
  • Last active: Nov 01 2014 03:23 PM
  • Joined: 29 Dec 2004

We should all thank JGR mostly. Without his RegisterCallback(), this release would be much less interesting. :)

Definitely. Standard Library functionality definitely also makes this release interesting though. I had been anxiously waiting for that one for quite a while :) .

Thanks for the great contribution JGR :D . Removing the "no callback functionality available" restriction definitely opens up a few more possibilities :D .

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Here are the changes for v1.0.47.01:

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]

System Monitor
  • Members
  • 508 posts
  • Last active: Mar 26 2012 05:13 AM
  • Joined: 09 Mar 2007
On Message() Link is Broken

corrupt
  • Members
  • 2558 posts
  • Last active: Nov 01 2014 03:23 PM
  • Joined: 29 Dec 2004

On Message() Link is Broken

where?

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
The OnMessage links in the topmost post of this topic have been fixed. Thanks.

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Here are the changes for v1.0.47.02:

Fixed the Number option of Edit controls to properly display balloon tips 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]

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Here are the changes for v1.0.47.03:

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]

Roland
  • Members
  • 307 posts
  • Last active: Mar 09 2014 07:55 PM
  • Joined: 08 Jun 2006
That was quick. Thanks! :)

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Here are the changes for v1.0.47.04:

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]

engunneer
  • Moderators
  • 9162 posts
  • Last active: Sep 12 2014 10:36 PM
  • Joined: 30 Aug 2005
I have two questions about the standard library:

1: from the manual

If a library function uses #Include, the working directory for #Include is the library function's own directory. This can be used to create a redirect to a larger library file that contains that function and others related to it.


Is this also true for DllCall? If I have a function and a dll used by that function in my library, do I need to call out the full path to the DLL (which I may not know), or will the function find it since it is in the same folder as the function, even though it may not be the working folder for the script?


2: from the manual

Although a library file generally contains only a single function of the same name as its filename, it may also contain private functions and subroutines that are called only by it. However, such functions should have fairly distinct names because they will still be in the global namespace; that is, they will be callable from anywhere in the script.


I think this may not be working right. Taking Titan's XPath.ahk as an example, I was trying to call both XPath() and XMLDoc() from my script without explicitly including the file. XPath() works as expected, but even though the file should have autoincluded itself for the XPath function, the XMLDoc function could not be found until I renamed it XPath_XMLDoc in both scripts. I assumed that this was because my code called XMLDoc before calling XPath, but changing the order did not seem to matter.

Does AHK build a list of functions it needs to find before including any? or does it include as it finds them?

thanks

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

1: from the manual

If a library function uses #Include, the working directory for #Include is the library function's own directory. This can be used to create a redirect to a larger library file that contains that function and others related to it.

Is this also true for DllCall? If I have a function and a dll used by that function in my library, do I need to call out the full path to the DLL (which I may not know), or will the function find it since it is in the same folder as the function, even though it may not be the working folder for the script?

I don't think that will work; so eventually a new feature such as A_StdLibPath will probably be needed (though until the stdlib path becomes customizable, A_AhkPath and SplitPath can be used to derive the location).

2: from the manual

Although a library file generally contains only a single function of the same name as its filename, it may also contain private functions and subroutines that are called only by it. However, such functions should have fairly distinct names because they will still be in the global namespace; that is, they will be callable from anywhere in the script.

I think this may not be working right. Taking Titan's XPath.ahk as an example, I was trying to call both XPath() and XMLDoc() from my script without explicitly including the file. XPath() works as expected, but even though the file should have autoincluded itself for the XPath function, the XMLDoc function could not be found until I renamed it XPath_XMLDoc in both scripts. I assumed that this was because my code called XMLDoc before calling XPath, but changing the order did not seem to matter.

Does AHK build a list of functions it needs to find before including any? or does it include as it finds them?

I believe functions are scanned from the top of the script to the bottom (though since this is undocumented, scripts probably shouldn't rely on it). When a call to a nonexistent function is reached, the program tries to load a file of that name from one of the libraries. If it finds such a file, the entire file is included, which should imake available all functions in that file for subsequent lookups of functions.

If you find this doesn't work, it would help to have a simple example to reproduce the problem.

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Here are the changes for v1.0.47.05:

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 the same variable is used for Haystack and OutputVar. [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 <!-- w -->www.pcre.org/changelog.txt<!-- w -->

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]

trik
  • Members
  • 1317 posts
  • Last active: Jun 11 2010 11:48 PM
  • Joined: 15 Jul 2007
Wahoo, nice going Chris. I just downloaded the new version and will be using some of the new updates in my circulated executable scripts.