ahkPause

Exported function used to pause or un-pause AutoHotkey module.
Paramenters can be strings only.


OutputVar := DllCall("Module\ahkPause", "Str", "On|Off", "Int")
Command  Example: DllCall "AutoHotkey.dll\ahkPause", "PTR", 1, "Int"
                  DllCall "AutoHotkey.exe\ahkPause", "PTR", 0, "Int"

Function Example: OutputVar := DllCall("AutoHotkey.dll\ahkPause", "Str", "On", "Int")
                  OutputVar := DllCall("AutoHotkey.exe\ahkPause", "Str", "Off", "Int")

Parameters

OutputVar

The name of the variable to store 1 / true if script is paused or 0 / false otherwise.

On / Off / TRUE / FALSE / 1 / 0

Parameter can be string for On / Off or PTR for TRUE / FALSE / NULL / 1 / 0 where 1 (true) means On.

Related

ahkPostFunction, ahkFindFunc, NewThread

Examples

dllpath:=A_AhkDir "\AutoHotkey.dll"
DllCall("LoadLibrary","Str",dllpath) ; Load the AutoHotkey module.
ThreadID:=DllCall(dllpath "\NewThread","Str","
(
Persistent
Loop
  ToolTip A_TickCount
)","Str","","Str","","CDecl") ; start a new thread, just the function.
Sleep 1000
DllCall(dllpath "\ahkPause","Str","On","Uint",ThreadID,"CDecl") ; Pause thread.
MsgBox "End"

; Same example like above using NewThread function.
dll:=NewThread("
(
Persistent
Loop
	ToolTip A_TickCount
)",,,,dllpath)
Sleep 1000
dll.ahkPause("On")
MsgBox "End"