ahkFunction


ahkFunction is used to launch a function in script.

ReturnValue:=DllCall(dll_path "\ahkFunction","Str","MyFunction",["Str",param1,"Str",param2,...,param10],"Cdecl Str")

Parameters

Parameter

Description

ReturnValue

ahkFunction returns the value that is returned by the launched function as string/text.

param1 to param10

Parameters to pass to the function. These parameters are optional.

Return Value

Cdecl Str - return value is always a string/text, add 0 to make sure it resolves to number if necessary.

Remarks

None.

Related

AutoHotkey.dll, ahkdll, ahktextdll, ahkReady, addFile, addScript, ahkExec, ahkLabel, 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

Example

AhkDll:=AhkDllObject("AutoHotkey.dll")
AhkDll.ahktextdll("
(LTrim
#Persistent
Func(){
    Msgbox Function
    Return ""OK""
}
)")
MsgBox % ahkDll.ahkFunction("func")