Calls a user-defined function contained in a string parameter.
Call ( "function" )
Parameters
function | The name of the user function to call. |
Return Value
Success: | Returns the return value of the called function. |
Failure: | Sets @error to 1 if the function does not exist. |
Remarks
The function cannot take any parameters and cannot be a built-in AutoIt function.
Related
AdlibEnable
Example
For $i = 1 to 2
$ret = Call("test" & $i)
MsgBox(4096,"", $ret)
Next
Func test1()
Return "Hello"
EndFunc
Func test2()
Return "Bye"
EndFunc