Function Reference


FuncName

Returns the name of a function stored in a variable.

FuncName ( $Functionvariable )

Parameters

$Functionvariable A variable containing a Function whose name you want to retrieve.

Return Value

Success: a string containing the name of the function.
Failure: "" (empty string) and sets the @error flag to 1.

Related

IsFunc

Example

#include <MsgBoxConstants.au3>

Example()

Func Example()
        ; Create a first class object of MsgBox and assign to a Local variable.
        Local $hMsgBox = MsgBox

        ; Display a MsgBox using the previously assigned variable.
        $hMsgBox($MB_SYSTEMMODAL, "", "This is a sentence with whitespace.")

        ; Display a MsgBox that shows the function name $hMsgBox.
        $hMsgBox($MB_SYSTEMMODAL, "", "The function name of $hMsgBox is: " & FuncName($hMsgBox))
EndFunc   ;==>Example