WSDOT Custom Scripting for Hyperion

ExternalVBScript.Args Property

Gets or sets the array of values defining the command line options for an ExternalVBScript object.
object.getArgs
object.setArgs(newvalue)

Arguments

object
Required. Always the name of a ExternalVBScript object.


newValue
Required for setArgs. An Array containing name-value pairs to use as command line arguments.



Remarks

The following example illustrates the use of the Args Property.

//	Create the array to store the arguments.
var arr = new Array();
//	Enter the arguments in name-value pairs.
arr.push("Filter");
arr.push("Text Files|*.txt|Excel Files|*.xls|All Files|*.*");
arr.push("initdir");
arr.push("C:\\AAWork");

//	Create an ExternalVBScript object.
var o = new wsdot_ExternalVBScript(g_strUserTempPath, "OpenFileDialog.vbs", strOFDlgVBS, arr, 60, true);

//	modify a command-line argument
var arrTemp = o.getArgs();
arrTemp[1] = "Text Files|*.txt|All Files|*.*";
o.setArgs(arrTemp);

//	Write the script to a file.
o.WriteScript();

//	Run the script and get the results.
var sFile = o.RunScript();

//	Use the results.
var sContent = ReadTextFromFile(sFile);

//	Reset the properties of the ExternalVBScript 
//	object and delete its associated files.
o.Reset();


Applies To:

ExternalVBScript Object



Requirements

The WSDOT Custom Scripts from the script repository must be loaded into the document.