The script is similar to the following, sorry I can not provide a simple function to reproduce it.
Code: Select all
f:=ahkthread()
f.new(".......")
f.add("A()`nA(){`nwinenum()`n}`nwinenum(){`nMsgBox RegisterCallback(`"winenum`")`n}")
MsgBox f.func("isfunc","winenum")
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.
Line#
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.