ahkPause


ahkPause is used to pause a thread and run traditional AutoHotkey Sleep, so it is different to DllCall("SuspendThread",...), so thread remains active and you can still do various things with it like ahkgetvar.

DllCall(dll_path "\ahkPause"[,"Str","on"])

Parameters

Parameter

Description

State

On or 1 to enable Pause / Off or 0 to disable pause. Pass empty string to find out whether thread is paused.

Return Value

Cdecl Int - return 1 if thread is paused or 0 if it is not.

Remarks

None.

Related

AutoHotkey.dll, ahkdll, ahktextdll, ahkReady, addFile, addScript, ahkExec, ahkLabel, ahkFunction, ahkPostFunction, ahkassign, ahkgetvar, ahkTerminate, ahkReload, ahkFindFunc, ahkFindLabel, ahkExecuteLine, Alias, cacheEnable, FindFunc, FindLabel, getTokenValue, getVar, Static, AutoHotkeyMini, DynaCall, CriticalSection, CriticalObject, MemoryLoadLibrary, ResourceLoadLibrary, MemoryGetProcAddress, MemoryFreeLibrary, Other Changes

Example

AhkDll:=AhkDllObject("AutoHotkey.dll")
AhkDll.ahktextdll("Loop`nToolTip % A_Index")
MsgBox Press OK to pause Thread
ahkdll.ahkPause("On") ;same as ahkPause.1 or ahkPause("On")...
MsgBox Thread Paused
ahkdll.ahkPause("Off")
MsgBox Thread unpaused`nPress OK to Exit