|
APGen Object |
|
See Also: |
The RunArgs() method executes an APG script with a list of arguments.
VBScript:
JScript:
| oAPGen | An APGen object. |
| 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. |
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++.
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.