A property
describes the object and determines its functionality. For example, you can say an apple is red. In
this case, red is a property of the apple. However, you can also paint the apple blue. In this case,
you changed the color property of the apple to another value. Methods are actions you can perform
with an object. For example, looking at an apple again, you can say that it has a grow
method. As the tree applies the grow method, the apple becomes larger. Events are responses to
specific object actions. For example, when the apple becomes mature, it raises the ???color??? event
to tell you that it??™s ripe.
Writing scripts in Windows means knowing the object you want to work with, the properties
that object provides, and the methods you can use with that object. You don??™t have to know about
every object. In fact, you??™ll find it easier to learn about one object at a time. The following sections
tell you about the main scripting object, WScript, and some of the supporting objects it contains.
USING THE SCRIPTING OBJECTS 177
TIP The combination of WSH and a scripting engine form an interpreter that accepts a script file
as input and outputs application data from the computer.
Pages:
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456