A parameter is a piece of data the method uses
to perform a task.
CreateObject(strProgID) Create the object specified by strProgID. This object could be
WSH specific like ???WScript.Network??? or application specific like ???Excel.Application???.
GetObject(strPathname [, strProgID]) Retrieves the requested object. strPathname
contains the filename for the object you want to retrieve. In most cases, this is going to be a data
file, but you can retrieve other kinds of objects as well. As soon as you execute this command, WSH
starts the application associated with that object. For example, if you specified C:\MyText.TXT
as the strPathname, then WSH may open Notepad to display it. The optional strProgID argument
allows you to override the default processing of the object. For example, you may want to
open the text file with Word instead of Notepad.
178 CHAPTER 6 WORKING WITH SCRIPTS
Echo(AnyArg) Displays text in a window (WScript) or to the console screen (CScript). AnyArg
can contain any type of valid output value. This can include both strings and numbers. Using
Echo without any arguments displays a blank line.
GetScriptEngine(strEngineID) Registers an alternative script engine such as PerlScript
(see the PerlScript site at http://www.
Pages:
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459