|
Script Object |
|
See Also: |
The Script.Abort() method halts execution of the script.
VBScript:
JScript:
| Script | The Script object. |
Script.Abort() halts execution of the script, and causes successful return from the Run() or RunArgs() call that ran the script.
This code snippet uses Util.OpenFileDialog() to ask the user to select some web pages. If the user clicks cancel, no files are returned, and the script Abort()s.
<%#
' Array of file paths
Dim rgInputFilePaths
' Prompt for input file
' Returns an Array
rgInputFilePaths = Util.OpenFileDialog("", _
"HTML type files,*.htm;*.html;*.asp,All,*.*", _
"Select some web pages", _
ofdFlagFileMustExist Or ofdFlagAllowMultiSelect)
If (UBound(rgInputFilePaths) < 0) Then
' User clicked cancel (empty array)
Script.Abort
End If
#%>