ActiveX.runMethod()


 

Availability

 

Windows

 

Usage

 

ActiveXinstance.runMethod(methodName:String, numArguments:String):Void

 

Parameters

 

methodName:String reference to the Method Name

 

numArguments:Number An Integer reference to the number of Arguments

 

Returns

 

Nothing

 

Description

 

Will run the specified method on the ActiveX/OLE Object.

 

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

 

myActiveX.runMethod("myMethod", 2)

 

 

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

 

myActiveX.runMethod("myMethod", 0)