Exported function used to pause or un-pause AutoHotkey module.
Paramenters can be strings only.
OutputVar := DllCall("Module\ahkPause", "Str", "On|Off", "Int")
Function Example: OutputVar := DllCall("AutoHotkey.dll\ahkPause", "Str", "On", "Int")
OutputVar := DllCall("AutoHotkey.exe\ahkPause", "Str", "Off", "Int")
The name of the variable to store 1 / true if script is paused or 0 / false otherwise.
Parameter can be string for On / Off or PTR for TRUE / FALSE / NULL / 1 / 0 where 1 (true) means On.
dllpath:=A_AhkDir "\AutoHotkey.dll"
DllCall("LoadLibrary","Str",dllpath) ; Load the AutoHotkey module.
DllCall(dllpath "\ahktextdll","Str","
(
#Persistent
Loop
ToolTip % A_TickCount
)","Str","","CDecl") ; start a new thread, just the function.
Sleep 1000
DllCall(dllpath "\ahkPause","Str","On","CDecl") ; Pause thread.
MsgBox End
; Same example like above using included AutoHotkey.dll
dll:=AhkThread("
(
#Persistent
Loop
ToolTip % A_TickCount
)")
Sleep 1000
dll.ahkPause["On"]
MsgBox End