Photoshop CS2
Adobe Photoshop CS2 Scripting Guide
Scripting basics 8
To get the script to open that window, you’d simply add the command or method for opening it. Thus your
scripting statement would look like this:
In my house, in the living room, the window on the north wall: open it.
Similarly, you could create a script in your house model to change the color of a door to blue. In this case,
you might be able to use the
door
object’s
color
property instead of a command or method:
In my house, in the bedroom, the door to the bathroom: blue.
Containment Hierarchy
When we refer to an object model as a
containment
hierarchy
, we mean that we identify objects in the
model partially by the objects that contain them. You can picture the objects in the house model in a
hierarchy, similar to a family tree, with the house on top, rooms at the next level, and the windows and
doors branching from the rooms.
Applying the Concept to Photoshop CS2
Now apply this object model concept to Photoshop CS2. The Photoshop CS2 application is the house, its
documents are the rooms, and the layers, layersets, channels, and selected areas in your documents are
the windows, doors, ceilings, and floors. You can tell Photoshop CS2 documents to add and remove
objects or set or change individual object properties like color, size and shape. You can also use commands
or methods, such as opening, closing, or saving a file.
Photoshop CS2’s Object Model
To create efficient scripts, you need to understand the containment hierarchy of the Photoshop CS2 object
model.
.
Application
Document
Art Layer
Channel
Histogram
Selection
History
State
Object Model Classes
Array
Text Item
Layer Set
Layer Set
Path Item
Path Point
(Object)
Notifier
Info
Document
Art Layer
Содержание PHOTOSHOP CS 2.0 - SCRIPTING GUIDE
Страница 1: ...bbc Adobe Photoshop cs 2 Scripting Guide ...