|
APGen Object |
|
See Also: |
The Run() method executes an APG script.
VBScript:
JScript:
| oAPGen | An APGen object. |
| strScriptPath | The path of an APG script. If strScriptPath is a relative path, then the path is appended to the current drive and directory, creating a full path. |
For an example, see the programmatic execution topic.
Calling APGen.Run() is functionally equivalent to the following VBScript code:
' Assume oAPGen object has already been created
Dim oScript
' Open and load the script
Set oScript = oAPGen.OpenScript(strScriptPath)
' Run the script
oScript.Run
' Release the script
Set oScript = Nothing
If you are running an APG script multiple times, then call APGen.OpenScript() once, and use APGScript.Run() or APGScript.RunArgs() to run the script each time. This saves the overhead of loading and parsing the APG script each time the script is run.
APGen.OpenScript() and the APGScript object allow more granular control over script execution than APGen.Run().