Additional Objects; Constants - Adobe 23102480 - Photoshop CS3 - PC Programming Manual

Scripting guide
Table of Contents

Advertisement

Adobe Photoshop CS3 Scripting Guide
Object Name
Color Sampler
Count Item
Measurement
Scale

Additional Objects

The Photoshop CS3 object model includes additional objects beyond the ones described in the
containment hierarchy above. Most of these classes are used as types for properties or to provide
information (as arguments) for commands or methods. For example:
The
color value (SolidColor/SolidColor)
(backgroundColor/backgroundColor)
(ForegroundColor/foregroundColor)
Color Objects' on page
Open and save options for documents are defined as classes, and these are passed to the commands
that open and save documents; e.g., the
class can be passed as an argument to the
Document' on page 26

Constants

An additional important component of the Photoshop CS3 object model for JavaScript and VBScript are
constants. Constants are a type of value that defines a property. For example, with the
Art Layer
about constants, see Introduction to Scripting.
Note:
Throughout this document, actual values of enumerations for VBScript are given using the
following format:
The ' before the explanation creates a comment and prevents the text to the right of the ' from being
read by the scripting engine. For more information about using comments, see Introduction to
Scripting.
For example, look up the art
Reference or in the Adobe Photoshop CS3 Visual Basic Scripting Reference. One of the properties of this
object is
Kind( kind
allowed values for the property. For VBScript, the constant is
LayerKind
Note:
Different objects can use the same property name with different constant values. The constant
values for the
Layer
Description
Represents a color sampler in your document.
Represents a counted item in the document.
Represents the measurement scale for your
document.
50.
and
'Saving a Document' on page
object, you can define only specific kinds that Photoshop CS3 allows. For general information
newLayerRef.Kind = 2 '2 indicates psLayerKind --> 2 (psTextLayer)
ArtLayer
). The value type for that property contains a link to the constant that define the
. Click the link to view the values you can use to define the
object's
Channel
object's
property.
kind
Photoshop CS3
class provides the type for the
and
foreground color
properties of the
BMP save options
(
/
save
saveAs
saveAs
29.
object in either the Adobe Photoshop CS3 JavaScript Scripting
PSLayerKind
property are different than the constant values for the
kind
Photoshop CS3 Scripting Basics
To create this object without
using a script:
Choose the Color Sampler
Tool, and click in the
document.
Choose the Count Tool and
click in the document.
The Measurement Scale object
cannot be created, but you can
change its properties by using
Image > Measurement Scale
> Custom.
background color
object. See
Application
(
BMPSaveOptions/BMPSaveOptions)
) command or method. See
, for JavaScript, the constant is
property.
kind
14
(Continued)
'Working with
'Opening a
property of an
kind
Art

Advertisement

Table of Contents
loading

This manual is also suitable for:

13102498 - photoshop cs3 - macPhotoshop cs3

Table of Contents