User Guide

636
Chapter 46
How Scripts W
ork
Scripts wor
k by manipulating objects using properties and methods. For example,
pivot tables are a class of objects. With objects of this class, you can use the
SelectTable method to select all of the elements in the table, and you can use the
TextColor p
roperty to change the color of selected text. Each object class has specific
properties and methods associated with it. The collection of all SPSS object classes
(or types) is called the SPSS type library.
Figure 46-12
Tree view of object hierarchy
Usin
g objects is a two-step process. First, you create a reference to the object (called
getting the object). Then, you use properties and methods to do something. You
get objects by navigating the hierarchy of objects, at each step using properties or
meth
ods of objects higher in the hierarchy to get at the objects beneath. For example,