>
Exported function to reload currently executed script by AutoHotkey module.
This function is only available in AutoHotkey.dll
OutputVar := DllCall("AutoHotkey.dll\ahkReload", "Int", TimeOut, "Int")Function Example: DllCall("AutoHotkey.dll\ahkReload", "Int", 0, "Int")
The name of the variable to store always 0 / false so can be ignored.
Time to wait until thread exits, use FALSE / NULL / 0 = no Timeout. NOTE: using a negative vaue you can force exit after given Timeout, with a positive Timeout it might take longer to exit thread.
dllpath:=A_AhkDir "\AutoHotkey.dll" DllCall("LoadLibrary","Str",dllpath) ; Load the AutoHotkey module. DllCall(dllpath "\ahktextdll","Str","#Persistent`nMyFunc(param){`nSleep 10000`nMsgBox `% param`n}","Str","","Str","","CDecl") ; start a new thread, just the function. DllCall(dllpath "\ahkFunction","Str","MyFunc","Str","Hello World!","CDecl Str") ; call the function.