An object can
be anything. For example, you can create an object that contains an Excel worksheet and use the functionality
of Excel to perform tasks at the command line. A worksheet could hold a directory listing, and
you can use the database features of Excel to perform a customized sort. All you need to do is create the
object using the WScript.CreateObject() method. If you already have a data file available to use for
your application, then use the WScript.GetObject() method to open the data file directly. In most
cases, you don??™t even need to worry about which application to use because the system uses the correct
application by default.
Applications are an obvious kind of object. Your machine contains literally thousands of objects, all of
which are available for use. For example, you can load an XML document by using the Msxml2
.DOMDocument.5.0 object. Once you create this object, you can load the XML document using the
Load() method and then process it using the various methods that the object provides. For example,
use the TransformNode() method to use XML Stylesheet Language Transformation (XSLT) to transform
the XML from one presentation to another.
Pages:
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461