ahkFundLabel is used to get a pointer to the label. (Equivalent to FindLabel)
DllCall(dll_path "\ahkFindLabel","Str","label","Cdecl UPTR")
| label | Name of label. |
None
AutoHotkey.dll, ahkdll, ahktextdll, ahkReady, addFile, addScript, ahkExec, ahkLabel, ahkFunction, ahkPostFunction, ahkassign, ahkgetvar, ahkTerminate, ahkReload, ahkFindFunc, ahkPause, ahkExecuteLine, Alias, cacheEnable, FindFunc, FindLabel, getTokenValue, getVar, Static, AutoHotkeyMini, DynaCall, CriticalSection, CriticalObject, MemoryLoadLibrary, ResourceLoadLibrary, MemoryGetProcAddress, MemoryFreeLibrary, Other Changes
#include <_Struct>
AhkDll:=AhkDllObject("AutoHotkey.dll")
AhkDll.ahktextdll("Persistent`nReturn`nTestLabel:`nMsgBox TestLabel`nReturn`nNewLabel:`nMsgBox % ""NewLabel ?= "" A_ThisLabel`nReturn")
_AHKLabel := "LPTSTR name,*_AHKLine JumpToLine,*_AHKLabel PrevLabel,*_AHKLabel NextLabel"
label:=new _Struct(_AHKLabel,ahkdll.ahkFindLabel("TestLabel")) ; init structure
MsgBox % label.name ; show name of label
label.JumpToLine:=label.NextLabel.JumpToLine[""] ; Change label line pointer
ahkdll.ahkLabel("TestLabel")