Func()

AutoHotkey GUI

Func() [v1.1.00+]

Retrieves a reference to the specified function.

FunctionReference := Func(FunctionName)

Parameters

FunctionName

The name of the function whose reference is retrieved. FunctionName must exist explicitly in the script.

Return Value

This function returns a reference to FunctionName. If FunctionName does not exist explicitly in the script (by means such as #Include or a non-dynamic call to a library function), it returns 0.

Remarks

This function can be used to call the function or retrieve information such as the minimum and maximum number of parameters.

Related

Function References, Func Object

Examples

; Retrieve a reference to the function named "StrLen".
fn := Func("StrLen")

; Display information about the function.
MsgBox % fn.Name "() is " (fn.IsBuiltIn ? "built-in." : "user-defined.")