>
Exported function to check if a script is currently executed by AutoHotkey module.
OutputVar := DllCall("AutoHotkey.dll\ahkReady","Uint", ThreadID)Function Example: IsPaused := DllCall("AutoHotkey.dll\ahkReady", "Uint", ThreadID)
The name of the variable to store 1 / true if script is executed or 0 / false otherwise.
The if of relevant thread, can be 0 if called in same thread.
dllpath:=A_AhkDir "\AutoHotkey.dll" DllCall("LoadLibrary","Str",dllpath) ; Load the AutoHotkey module. ThreadID:=DllCall(dllpath "\NewThread","Str","Sleep 2000","Str","","Str","AutoHotkey dll","CDecl") ; start a new thread, just the function. While DllCall(dllpath "\ahkReady","Uint", ThreadID) ; wait until AutoHotkey.dll thread exits. Sleep 100 MsgBox End ; Same example like above using NewThread function dll:=NewThread("Sleep 2000",,,,dllPath) while dll.ahkReady() Sleep 100 MsgBox "End"