ActiveX.runMethodRet()


 

Availability

 

Windows

 

Usage

 

ActiveXinstance.runMethodRet(methodName:String, numArguments:Number):Void

 

Parameters

 

methodName:String reference to the Method Name

 

numArguments:Number An Integer reference to the number of Arguments

 

Returns

 

A String

 

Description

 

Will run the specified method on the ActiveX/OLE Object. This command is the same as ActiveX.runMethod() except that it has a return variable.

 

Notes

 

If your method has arguments, the you MUST set up the parameters first before you can run this command. See ActiveX.addMethodParam()
 
You must specify the number of arguments that the method has. If it has none, then give it a value of "0".
 

Example

 

We instantiate an ActiveX Instance, myActiveX, which contains a method called myMethod. This method has 2 parameters which must be declared first, before we can run the method:

 

// First declare the Method Parameters

 

myActiveX.addMethodParam(1, "string", "John")

myActiveX.addMethodParam(2, "integer", 35)

 

// Run the Method

 

Result = myActiveX.runMethodRet("myMethod", 2);

 

 

In the next example below, the same Method does not have any Parameters. In this case, the correct code would be:

 

Result = myActiveX.runMethodRet("myMethod", 0);