xav.com/perl/Components/Windows/PerlScript
.html or the Windows Script Host Resources site at http://labmice.techtarget.com/
scripting/WSH.htm for details on this alternative). strEngineID contains the identifier for the
script engine that you want to retrieve. You??™ll need to register the engine using the GetScriptEngine
.Register() method before you can actually use it. A script engine also requires you to provide
a default extension.
Quit(intErrorCode) Exits the script prematurely. The optional intErrorCode argument
returns an error code if necessary. You can test for this value using the ErrorLevel clause in
batch files.
Working with the WScript.WshArguments Object
Whenever you start a script, you have the option of passing one or more arguments to it on the
command line. That??™s where the WshArguments object comes into play. It helps you determine
the number of arguments, and then retrieve them as needed. You??™ll always use the WScript.Arguments
property to access this object; it??™s not directly accessible. The following list describes the properties
for this object.
Working with Objects
Scripts have a definite advantage over batch files because you can use objects in scripts.
Pages:
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460