[BUG] "RegisterCallback" wrong.

Ask for help, how to use AHK_H, etc.
Posts: 544
Joined: 17 Nov 2013, 11:32

[BUG] "RegisterCallback" wrong.

06 Oct 2017, 10:43

I have encountered a problem using the "addScript" to add a script, and if the script contains a "RegisterCallback" command, the function that contains it will not be recognized.
The script is similar to the following, sorry I can not provide a simple function to reproduce it.

Code: Select all

f.add("A()`nA(){`nwinenum()`n}`nwinenum(){`nMsgBox RegisterCallback(`"winenum`")`n}")
MsgBox f.func("isfunc","winenum")
I used it for a long time to try to solve it, but there was no result.
So i think that this does not seem to be my scripting problem.
So I used the old version.

Back to "Commits on Sep 14, 2017" version.
Everything is fine.

The problem is here, starting from this version, "RegisterCallback" began to go wrong.
Commits on Sep 21, 2017
Fix ZipInfo and bug in FileRead

Code: Select all

Error:  Parameter #1 invalid.

	611: {
--->	613: Return p=""?(rc:=RegisterCallback("win_enum","f",2),f:=[],id:=1,EnumChildWindows(hwnd,rc,0),GlobalFree(rc),r:=f,id:=f:="",r) :(VarSetCapacity(c,512,0),GetClassName(hwnd,&c,256),class:=StrGet(&c,"utf-16"),r:=id++,f[class,r]:=hwnd,f[r]:={hwnd:hwnd,class:class},1)
	615: }
	616: {
	617: f := IsObject(name)?name:{name:name,wait:wait,param:param,to:to,module:module,Parent:A_id,hwnd:A_ScriptHwnd}
	618: if !(h:=A_Script[f.name]) or h.ban
	619: Return
	620: t:=h.type,w:=wait or h.wait,f.as:=h,f.code:=Pivot_Code(h)
	621: if R:=!t?"d":RegExMatch(t,"i)l|f|d|c|e|t|p",t)?t.0:""

The current thread will exit.
Posts: 1756
Joined: 29 Sep 2013, 18:35

Re: [BUG] "RegisterCallback" wrong.

06 Oct 2017, 15:37

Thanks for checking, this should be fixed now ;)

Return to “Ask For Help”

Who is online

Users browsing this forum: No registered users and 3 guests