I tried to put the DllCall part to a new line and it works, however I still get an error from time to time, not sure this is the right solution. You provided me with the function long time ago and I wonder if there is an update? Thanks.
Code: Select all
string:="
(
#Persistent
!y::
Input(""This is my Text"")
return
!x::Reload
Input(Text){
DllCall(A_AhkExe() ""\ahkFunction"",""Str"",""MyFunction"",""Str"", Text, ""Cdecl Str"")
return
}
A_AhkExe(){
static e,i:=VarSetCapacity(e,520) DllCall(""GetModuleFileName"",PTR,0,Str,e,UInt,260) VarSetCapacity(e,-1)
return e
}
)"
dll0:=ahkthread(string)
return
MyFunction(Text){
msgbox % Text
return
}