APGen Documentation Previous Topic: APGen.Run() Next Topic: APGen.OpenScript() Parent Topic: APGen Object    APGen Object
APGen.RunArgs()
See Also:

The RunArgs() method executes an APG script with a list of arguments.

Syntax

VBScript:

oAPGen.RunArgs strScriptPath, ArgList...

JScript:

oAPGen.RunArgs( strScriptPath, ArgList... );

Object

oAPGen An APGen object.

Parameters

strScriptPath The path of an APG script.  If strScriptPath is a relative path, then the path is resolved using the current drive and directory.
ArgList... A list of 0 or more arguments.

Notes

The ArgList  is placed in the Script.Arguments collection.

This method cannot be called from Visual Basic - VB does not support parameters with the vararg attribute. To run an APG script from VB, use the Run method. RunArgs can only be called from VBScript, JScript, and C++.

Example

Below is a VBScript example that executes an APG script using RunArgs() :

Dim oAPGen
Set oAPGen = CreateObject("APGen")

' Create a "Foo" COM object to pass to the script
Dim objFoo
Set objFoo = CreateObject("Foo")

' Run the test.apg script, pass in two arguments
oAPGen.RunArgs "test.apg", objFoo, "string param"

The objFoo object, and the string "string param" are passed into the Script.Arguments collection of the test.apg script.

Applies To

APGen Object