ahkLabel is used to launch a Goto/GoSub routine in script.
labelFound:=DllCall(dll_path "\ahkLabel","Str","MyLabel","UInt",nowait,"Cdecl UInt")
| Parameter | Description |
| labelFound | ahkLabel() returns 1 if label exists else 0. |
| label ("MyLabel") | name of label to launch. |
| nowait | 0 = Gosub (default), 1 = GoTo (PostMessage mode) |
Default is 0 = wait for code to finish execution, this is because PostMessage is not reliable and might be scipped so script will not execute.
AutoHotkey.dll, ahkdll, ahktextdll, ahkReady, addFile, addScript, ahkExec, ahkFunction, ahkPostFunction, ahkassign, ahkgetvar, ahkTerminate, ahkReload, ahkFindFunc, ahkFindLabel, ahkPause, ahkExecuteLine, Alias, cacheEnable, FindFunc, FindLabel, getTokenValue, getVar, Static, AutoHotkeyMini, DynaCall, CriticalSection, CriticalObject, MemoryLoadLibrary, ResourceLoadLibrary, MemoryGetProcAddress, MemoryFreeLibrary, Other Changes
AhkDll:=AhkDllObject("AutoHotkey.dll")
AhkDll.ahktextdll("Persistent`nReturn`nSub:`nMsgBox Sub`nReturn") ;Starts empty thread in #Persistent + #NoTrayIcon mode
ahkDll.ahkLabel.Sub ;Gosub Sub