
Adobe Photoshop CS3
JavaScript Scripting Reference
Introduction 33
●
On Mac OS, the document can be found in the following folder:
Applications/Utilities/Adobe Utilities/ExtendScript Toolkit 2/SDK
●
Documentation that provides an overview of Scripting is now found in a new document entitled
Introduction to Scripting
, instead of in the
Photoshop CS3 Scripting Guide
.
●
Photoshop CS3 has an Extended Version and a Standard Version. Some additional features are available
in the Extended Version.
●
CountItems
provides support in scripting for the Count Tool. A new collection,
CountItems
, is defined,
with a corresponding
countItems
property on
Document
, that refers to the collection
CountItems
.
This feature is available only in the Extended Version.
●
ColorSamplers
have been provided for the
Document
object. A new collection,
ColorSamplers
, is
defined, with a corresponding
colorSamplers
property on
Document
that refers to the collection
ColorSamplers
.
●
DICOMOpenOptions:
a new class that provides options for opening files in the DICOM format; this
feature is only available in the Extended Version.
●
The measurement scale feature adds a
measurementScale
property to the
Document
object, which
accesses the
MeasurementScale
object. The
measurementScale
property on
Document
is read-only
(i.e. you cannot create a new
MeasurementScale
object), but the properties of the
MeasurementScale
object (
pixelLength
,
logicalLength
, and
logicalUnits
) can be set directly. This feature is available
only in the Extended Version.
●
New JavaScript Resource that allows scripts to behave like plug-ins. Provides a way to specify a menu
the script appears in, a terminology resource to allow the script to function with the Action Manager,
and a way to indicate whether the scripts is enabled in the menu or not.
●
New and modified methods:
●
Application.featureEnabled()
: Allows you to determine if a feature with a given name is
enabled, as related to the Extended version of Photoshop.
●
Application.refresh
(): Pauses the script while the application refreshes.
●
Application.openDialog():
Allows you to use the Photosho open dialog to select files.
●
Application.putCustomOptions(),
Application.getCustomOptions()
,
Application.eraseCustomOptions()
: Allow you to save and load your parameters
●
Application.open():
Includes a boolean parameter
smartObject
, which indicates whether to
create a smart object around the document opened.
●
Document.duplicate()
: Provides new parameters for naming the duplciated document and
setting a "merge visible layers" only option.
●
Documents.add()
: Provides new parameters for document depth and color profile name.
●
Document.suspendHistory()
: Allows you to provide a JavaScript string that executes as a single
history state. Provides one undo and history item for multiple changes to a document.
●
New properties:
●
scriptingBuildDate
added to the
Application
object.
●
recentFiles
added to the
Application
object.
●
Solid,
boolean, added to
Selection
object, indicates if the bounding rectangle is solid.
●
Modified enumerations:
●
HARDMIX
has been added to the BlendMode enumeration.
●
HARDMIXBLEND
has been added to the ColorBlendMode enumeration.