ahkPostFunction is used to launch a function in script and return immediately (so function will run in background and return value will be ignored).
ReturnValue:=DllCall(dll_path "\ahkPostFunction","Str","MyFunction",["Str",param1,"Str",param2,...,param10],"Cdecl UInt")
| Parameter | Description |
| ReturnValue | ahkPostFunction returns 1 if function exists else 0. |
| param1 to param10 | Parameters to pass to the function. These parameters are optional. |
None.
AutoHotkey.dll, ahkdll, ahktextdll, ahkReady, addFile, addScript, ahkExec, ahkLabel, ahkFunction, 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("
(LTrim
#Persistent
Func(){
Sleep 1000
Msgbox Function
}
)")
MsgBox % ahkDll.ahkPostFunction("func")