> ahkReload

ahkReload

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")

Parameters

OutputVar

The name of the variable to store always 0 / false so can be ignored.

Timeout

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.

Related

ahkPostFunction, ahkFindFunc

Examples

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.