ahkgetvar is used to get a value from a variable in script.
Value:=DllCall(dll_path "\ahkgetvar","Str","var","UInt",getPointer,"Cdecl Str")
| Parameter | Description |
| Value | ahkgetvar() returns the value of a variable as string. |
| var | name of variable to get value from. |
| getPointer | set to 1 to get pointer of variable to use with Alias(), else 0 to get the value. |
ahkgetvar returns empty if variable does not exist or is empty.
AutoHotkey.dll, ahkdll, ahktextdll, ahkReady, addFile, addScript, ahkExec, ahkLabel, ahkFunction, ahkPostFunction, ahkassign, 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() ;start empty thread, in this mode #Persistent and #NoTrayIcon will be default
ahkdll.ahkassign.a:="test"
MsgBox % ahkdll.ahkgetvar.a ;same as ahkdll.ahkgetvar("a") or ahkdll.ahkgetvar["a"]