Object Model - Adobe 23101764 - Photoshop CS - PC Manual

Scripting guide
Hide thumbs Also See for 23101764 - Photoshop CS - PC:
Table of Contents

Advertisement

Scripting basics
2

Object Model

JavaScript
app.activeDocument.layerSets[0].layers[0];
When you identify an object in this fashion, you're creating an object reference. While
AppleScript, Visual Basic and JavaScript use different syntax for object references, each gives
the script a way of finding the object you want.
2.3 Object Model
To create efficient scripts, you need to understand the containment hierarchy of the object
model. Understanding the relationships among objects allows you to construct logical scripts
with sound structures that contain fewer bugs and are easier to maintain.
In the object model illustrated below, the Photoshop Application object sits at the top of the
containment hierarchy. The Document object, directly below the Photoshop application, is the
the active object you are working with and the gateway to the main components of the
Photoshop object model.
Document Class
The Document class is used to make modifications to the document image. By using the
Document object you can crop, rotate or flip the canvas, resize the image or canvas, and trim
the image. You could also use the Document object to get the active layer, for example, save
the current document, then copy and paste within the active document or between different
documents.
For more information on document objects, see
Section 3.9 on page
68.
10
Photoshop CS Scripting Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop cs

Table of Contents