Photoshop CS Scripting Guide
2
Introduction
What is scripting?
1
In this case,
display dialogs
refers to the AppleScript property,
DisplayDialogs
refers
to the Visual Basic property and
displayDialogs
refers to the JavaScript property, as
illustrated below.
Once you become familiar with this notation, simply focus on the values and description for
the language you intend to use, ignoring the rest.
For larger blocks of code, scripting examples are often placed side by side.
AppleScript
layer 1 of layer set 1 of current document
Visual Basic
appRef.ActiveDocument.LayerSets(1).Layers(1)
JavaScript
app.activeDocument.layerSets[0].layers[0];
Finally, tables are sometimes used to organize lists of values specific to each scripting
language.
1.2 What is scripting?
A script is a series of commands that tells Photoshop to perform a set of specified actions, such
as applying different filters to selections in an open document. These actions can be simple,
and affect only a single object, or complex and affect many objects in a Photoshop document.
The actions can call Photoshop alone or invoke other applications.
Scripts automate repetitive tasks and are often used as a creative tool to streamline tasks that
might be too time consuming to do manually. For example, you could write a script to generate
a number of localized versions of a particular image; or to gather information about the
various color profiles used by a collection of images.
The
display dialogs
(
DisplayDialogs/displayDialogs
) property is part of the
Application object.
Visual Basic
JavaScript
AppleScript