IR Framework

ExternalVBScript.Timeout Property

Gets or sets the maximum time an ExternalVBScript object is allowed to run its script.
object.getTimeout
object.setTimeout(newvalue)

Arguments

object
Required. Always the name of a ExternalVBScript object.


newitem
Required for setTimeout. The maximum number of seconds the ExternalVBScript.Run() method is allowed to wait for data from the script.



Remarks

The following example illustrates the use of the Timeout 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 ActiveDocument.ExternalVBScript(g_strUserTempPath, "OpenFileDialog.vbs", strOFDlgVBS, arr, 60, true);

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

//	give the script/user 2 minutes to complete the task
o.Timeout = 120;

//	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