AppleScript Scripting Reference for Windows® and Macintosh®.
NOTICE: All information contained herein is the property of Adobe Systems Incorporated. No part of this publication (whether in hardcopy or
electronic form) may be reproduced or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or
otherwise, without the prior written consent of Adobe Systems Incorporated. The software described in this document is furnished under
license and may only be used or copied in accordance with the terms of such license.
This publication and the information herein is furnished AS IS, is subject to change without notice, and should not be construed as a
commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or
inaccuracies, makes no warranty of any kind (express, implied, or statutory) with respect to this publication, and expressly disclaims any and
all warranties of merchantability, fitness for particular purposes, and noninfringement of third party rights.
Any references to company names in sample templates are for demonstration purposes only and are not intended to refer to any actual
organization.
Adobe, the Adobe logo, Acrobat, Illustrator, and Photoshop are either registered trademarks or trademarks of Adobe Systems Incorporated in
the United States and/or other countries.
Apple, Mac, and Macintosh are trademarks of Apple Computer, Inc., registered in the United States and other countries. Microsoft, and
Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and other countries. JavaScript and all
Java-related marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. UNIX is a
registered trademark of The Open Group.
All other trademarks are the property of their respective owners.
If this guide is distributed with software that includes an end user agreement, this guide, as well as the software described in it, is furnished
under license and may be used or copied only in accordance with the terms of such license. Except as permitted by any such license, no part
of this guide may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, recording,
or otherwise, without the prior written permission of Adobe Systems Incorporated. Please note that the content in this guide is protected
under copyright law even if it is not distributed with software that includes an end user license agreement.
The content of this guide is furnished for informational use only, is subject to change without notice, and should not be construed as a
commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or
inaccuracies that may appear in the informational content contained in this guide.
Adobe Systems Incorporated, 345 Park Avenue, San Jose, California 95110, USA.
Changes Since Earlier Versions.................................................................................................................................................. 8
art layer, art layers ........................................................................................................................................................................15
BMP save options .........................................................................................................................................................................25
brightness and contrast.............................................................................................................................................................27
camera raw open options .........................................................................................................................................................28
color balance..................................................................................................................................................................................35
color value.......................................................................................................................................................................................36
dust and scratches .......................................................................................................................................................................51
EPS open options .........................................................................................................................................................................52
EPS save options...........................................................................................................................................................................53
export options save for web.....................................................................................................................................................56
gallery color options ...................................................................................................................................................................61
GIF save options............................................................................................................................................................................68
high pass..........................................................................................................................................................................................72
history state, history states .......................................................................................................................................................73
HSB color .........................................................................................................................................................................................74
JPEG save options ........................................................................................................................................................................81
Lab color ..........................................................................................................................................................................................82
maximum filter..............................................................................................................................................................................93
median noise..................................................................................................................................................................................94
no color ............................................................................................................................................................................................98
open options............................................................................................................................................................................... 103
path point, path points ........................................................................................................................................................... 106
path point info............................................................................................................................................................................ 107
PDF open options...................................................................................................................................................................... 108
PDF save options ....................................................................................................................................................................... 110
Photo CD open options........................................................................................................................................................... 113
Photoshop DCS 1.0 save options......................................................................................................................................... 114
Photoshop DCS 2.0 save options......................................................................................................................................... 116
Photoshop save options ......................................................................................................................................................... 118
PICT file save options ............................................................................................................................................................... 119
PICT resource save options.................................................................................................................................................... 120
Pixar save options ..................................................................................................................................................................... 124
PNG save options ...................................................................................................................................................................... 125
raw format open options........................................................................................................................................................ 131
raw save options........................................................................................................................................................................ 132
RGB color ...................................................................................................................................................................................... 133
save options ................................................................................................................................................................................ 136
sub path info............................................................................................................................................................................... 150
sub path item, sub path items.............................................................................................................................................. 151
Targa save options.................................................................................................................................................................... 152
texture fill ..................................................................................................................................................................................... 161
TIFF save options....................................................................................................................................................................... 163
close ............................................................................................................................................................................................... 176
convert to shape........................................................................................................................................................................ 179
create PDF presentation ......................................................................................................................................................... 182
create work path........................................................................................................................................................................ 183
do action....................................................................................................................................................................................... 188
do javascript................................................................................................................................................................................ 189
fill path .......................................................................................................................................................................................... 196
index .............................................................................................................................................................................................. 203
link .................................................................................................................................................................................................. 205
make clipping path................................................................................................................................................................... 207
make work path ......................................................................................................................................................................... 208
open ............................................................................................................................................................................................... 211
reset from comp ........................................................................................................................................................................ 218
select all ........................................................................................................................................................................................ 226
similar ............................................................................................................................................................................................ 227
trim ................................................................................................................................................................................................. 235
web safe color............................................................................................................................................................................. 237
Appendix A: Event ID Codes ................................................................................................... 238
Index .........................................................................................................................................246
1
Introduction
This reference describes the objects and commands in the Adobe® Photoshop® CS2 AppleScript
dictionary. A companion document, Photoshop CS2 Scripting Guide, describes basic scripting concepts
and the Photoshop object model. This document provides reference details of the Photoshop object
model, and additional information on AppleScript-specific features.
This book contains the following sections:
● This introduction, which describes scripting support in Adobe Photoshop CS2, and lists changes to the
AppleScript interface since the previous release.
● AppleScript Objects, which provides a complete reference for all Photoshop DOM objects and
commands.
● AppleScript Commands, which provides a complete reference for all AppleScript Photoshop DOM commands.
Changes Since Earlier Versions
The following changes have been made to the AppleScript object model and language support in Adobe
Photoshop CS2:
● Support for interapplication communication among Creative Suite 2 applications through exported
ExtendScript functions and interapplication messaging. For details, see the Creative Suite 2 Bridge
JavaScript Reference.
● The following classes have been added to the AppleScript interface:
● camera raw open options, which you use to specify options when opening a document in
camera raw format.
● export options save for web, which you use to optimize documents for the Web.
● contact sheet options, which you use to create and format contact sheets.
● batch options, which you use to specify options for the Batch command.
● lens blur options, which you use to specify options when applying the Lens Blur filter to a layer.
8
2
Action Manager
Adobe Photoshop CS2 actions allow you to save time by automating repetitive tasks.
Note: You create and run actions in the application interface using the Actions palette.
You can manage actions in scripts using a utility called the Action Manager. The Action Manager also allows
you to write scripts that target Adobe Photoshop CS2 functionality that is not otherwise accessible in the
scripting interface, such as third party plug-ins and filters that are available through the application but
not in the current scripting reference.
The only requirement for using the Action Manager is that the task that you want to access from the Action
Manager is recordable.
This chapter describes how to use the Action Manager and the scripting interface objects it includes.
Running JavaScript based Action Manager code from AppleScript
There is no Action Manager functionality in AppleScript. However, you can execute JavaScript code and
files from AppleScript using the
You need to rewrite your JavaScript code slightly to work with the do javascript command’s arguments
in order to get access to the AppleScript values from JavaScript. For example save the following JavaScript
Emboss.jsx:
as
do javascript command. See ‘do javascript’ on page 189.
function emboss(angle, height, amount)
{
var id32 = charIDToTypeID("Embs");
var desc7 = new ActionDescriptor();
var id33 = charIDToTypeID("Angl");
desc7.putInteger(id33, angle);
var id34 = charIDToTypeID("Hght");
desc7.putInteger(id34, height);
var id35 = charIDToTypeID("Amnt");
desc7.putInteger(id35, amount);
executeAction(id32, desc7);
}
In your AppleScript, call the Emboss function with values provided in the arguments collection, as follows:
emboss(arguments[0], arguments[1], arguments[2]);
The following AppleScript code sample runs the Emboss filter:
tell application "Adobe Photoshop CS2"
do javascript (file <path to Emboss.jsx>) ¬
with arguments { 75,2,89 }
end tell
Note: For information on creating JavaScripts to use with the Action Manager, see Action Manager chapter
in the Adobe Photoshop CS2 JavaScript Scripting Reference, which is available on the installation CD.
9
3
Elements
AppleScript Objects
The objects of the AppleScript dictionary for Adobe Photoshop CS2 are presented alphabetically and in
tabular format in this chapter. Where appropriate, the object class has two tables:
● Element — Lists the classes that inherit from the current class, as well as the methods by which the
classes can be referred.
● Property — The properties you can use with the object, as well as each property’s value type, input
status, and description.
The commands that can be used with an object are listed below the object’s Properties table.
Sample code for several object classes is given to help illustrate the syntax as well as usage of the object
class.
The following sample tables and command list illustrate the format for this chapter.
ElementRefer to by
channel
Properties
PropertyValue TypeWhat it is
bits per channel
component channels
current channels
current layer
info
Valid Commands
change mode
close
convert
count
name, numeric index, as a range of elements, before
after another element, satisfying a test
Valid values:
eight
one
sixteen
list of channels
list of channel
layer
info-object
The number of bits per channel.
Read-only. A list of the component color channels.
Options that may be supplied when applying an Add Noise filter.
add noise class supplies properties for the filter options class. The add noise class is used only
The
to define a record whose properties specify options when applying an Add Noise filter.
options can be supplied only in conjunction with the filter command. It is not possible to get or create
add noise object.
an
See the filter command for additional details.
Properties
PropertyValue TypeWhat it is
add noise
amount
distribution
monochromatic
real
Valid values:
Gaussian
uniform
boolean
(amount: 0.1% - 400%)
The following code sample demonstrates how to apply the add noise filter using the filter command of the
add noise class (inherited from the filter options super class).
...
filter current layer of the current document using add noise filter ¬
with options {class:add noise, distribution:uniform ¬
monochromatic:false}
Options used with the adjust method. The following classes inherit properties from the adjustment options
class: automatic contrast, automatic levels, brightness and contrast, color balance, curves,
Read-only. The application preference settings
(equivalent to selecting Edit > Preferences in the
Adobe Photoshop CS2 application in Windows or
Photoshop > Preferences in Mac OS).
version
Unicode text
Read-only. The Adobe Photoshop version.
The the first line of the following code sample directs Adobe Photoshop CS2 to carry out the script’s
commands. The second line uses the
activate command to make Adobe Photoshop CS2 the frontmost
Any layer that can contain data. The art layer class inherits properties from the layer, layers class.
Properties
PropertyValue TypeWhat it is
best type
class type
default type
index
properties
all locked
blend mode
type class
class
type class
integer
record
boolean
Valid Values:
color blend
color burn
color dodge
darken
difference
dissolve
exclusion
hard light
hue blend
lighten
linear burn
linear dodge
linear light
luminosity
multiply
normal
overlay
pass through
pin light
saturation blend
screen
soft light
vivid light
Read-only. (Inherited from the layer class)
The best type for the object's value.
Read-only. (Inherited from the layer class)
The object’s class.
Read-only. (Inherited from the layer class)
The default type for the object’s value.
Read-only. (Inherited from the layer class)
The index of this instance of the object.
Read-only. (Inherited from the layer class) All
of this object’s properties returned in a single
record.
Read-only. (Inherited from the layer class)
Indication of whether all of the layer’s
contents are locked or editable.
(Inherited from the layer class) The mode
used when compositing an object.
bounds
container
list
reference
Read-only. (Inherited from the layer class) A
list of coordinates that describes the bounding
rectangle of the layer.
Read-only. (Inherited from the layer class)
The object’s container.
The automatic contrast class supplies options properties for the adjustment options class to
automatically adjust the overall contrast and mixture of colors in an RGB image.
automatic contrast class, which is analogous to the Auto Contrast command in the Adobe
The
Photoshop CS2 application, is used only to define a record containing properties that specify options
when using the
contrast
create an
See the adjust command for additional details.
The following code sample demonstrates how to apply an Automatic Contrast adjustment using the
adjust command of the automatic contrast class (inherited from the adjustment options super
class).
...
adjust current layer of the current document using automatic contrast adjustment¬
with options {class:automatic contrast}
adjust command to apply an Auto Contrast adjustment to an image. The automatic
class can be used only in conjunction with the adjust command. It is not possible to get or
The automatic levels class supplies options properties for the adjustment options class to
automatically adjust the black point and white point in an image.
automatic levels class, which is analogous to the Auto Levels command in the Adobe Photoshop
The
CS2 application, is used only to define a record containing properties that specify options when using the
adjust command to apply an Auto Levels adjustment to an image. The automatic levels class can be
used only in conjunction with the
levels
object.
See the adjust command for additional details.
adjust command. It is not possible to get or create an automatic
The following code sample demonstrates how to apply an Automatic Levels adjustment using the
command of the
...
adjust current layer of the current document using automatic levels adjustment¬
with options {class:automatic levels}
automatic levels class (inherited from the adjustment options super class).
Options that can be specified when changing the document mode to Bitmap using the change mode
command. The
This class is used to define a record containing properties used to specify options when changing a
document’s mode.
command. It is not possible to get or create a
command for more details.
Properties
PropertiesValue TypeWhat it is
bitmap mode class inherits properties from the change mode optionsclass.
Bitmap mode options can only be supplied in conjunction with the change mode
Options that may be supplied when applying a Blur filter.
blur class supplies properties for the filter options class. The blur class is used only to define a
The
record when using the
conjunction with the
See the
filter command for additional details.
filter command to apply a Blur filter. blur options can be supplied only in
filter command. It is not possible to get or create a blur object.
The following code sample demonstrates how to apply the blur filter using the filter command of the
class (inherited from the filter options super class).
...
filter current layer of the current document using blur filter
with options {class:blur}
The blur more class supplies properties for the filter options class when using the filter command
apply a Blur More filter. The
command to apply a Blur More filter. The
filter command. It is not possible to get or create a blur more object.
See the
filter command for additional details.
The following code sample demonstrates how to apply the blur more filter using the filter command of the
blur more class (inherited from the filter options super class).
...
filter current layer of the current document using blur more filter
with options {class:blur more}
blur more class is used only to define a record when using the filter
blur more option can be supplied only in conjunction with the
The following code creates the myOptions variable to hold the BMP save options, then uses the save
command to save the document with the specified options. The code uses the default values for the
properties
tell application "Adobe Photoshop CS2"
bits per channel (twentyfour) and target operating system (true).
make new document
set myOptions to {class:BMP save options, ¬
save layers: true, save alpha channels: true¬
image compression: RLE compression:true, save annotations: true}
save current document in file myFile as BMP with options ¬
The brightness and contrast class supplies options properties for the adjustment options class to
adjust the tonal range of an image.
brightness and contrast class, which is analogous to the Brightness/Contrast command in the
The
Adobe Photoshop CS2 application, is used only to define a record containing properties that specify
options when applying a Brightness/Contrast adjustment to an image. The
class can be used only in conjunction with the adjust command. It is not possible to get or create a
brightness and contrast object.
See the adjust command for additional details.
Properties
PropertyValue TypeWhat it is
brightness and contrast
brightness level
contrast level
integer
integer
(-100 - 100)
(-100 - 100)
The following code sample demonstrates how to apply a Brightness/Contrast adjustment using the
adjust command of the brightness and contrast class (inherited from the adjustment options
super class).
...
adjust current layer of the current document using brightness and contrast
adjustment¬
Options that can be specified when opening a document in Camera Raw format. The camera raw open
options
This class is used to define a record containing properties that specify options when opening a document
in raw format.
is not possible to get or create a
Properties
PropertyValue typeWhat it is
class inherits properties from the open options class.
camera raw open options can be supplied only in conjunction with the open command. It
camera raw open options object.
bitsPerChannel
blueHue
blueSaturation
brightness
chromaticAberrationBY
chromaticAberrationRC
colorNoiseReduction
colorSpace
contrast
Valid values:
EIGHT
ONE
SIXTEEN
THIRTYTWO
integer
integer
integer
integer
integer
integer
Valid values:
ADOBERGB
COLORMATCHRGB
PROPHOTORGB
SRGB
integer
The number of bits per channel.
The blue hue of the shot (-100 - 100).
The blue saturation of the shot (-100 - 100).
The brightness of the shot (0 - 150).
The chromatic aberration B/Y of the shot (-100 -
100).
The chromatic aberration R/C of the shot (-100 -
100).
The color noise reduction of the shot (0 - 100).
The colorspace for the image.
The contrast of the shot (-50 - 100).
exposure
greenHue
greenSaturation
luminanceSmoothing
redHue
redSaturation
resolution
saturation
real
integer
integer
integer
integer
integer
real
integer
The exposure of the shot (4.0 - 4.0).
The green hue of the shot (-100 - 100).
The green saturation of the shot (-100 - 100).
The luminance smoothing of the shot (0 - 100).
The red hue of the shot (-100 - 100).
The red saturation of the shot (-100 - 100).
The resolution of the document in pixels per
inch (1 - 999).
Options that can be specified for a CMYK color: numeric values for the component colors. The CMYK color
class inherits properties from the color value class.
This class a property of the color value object and is used to define a record that specifies options when
creating a color value.
Note: If the
Properties
PropertyValue TypeWhat it is
cyan
magenta
yellow
black
The following code creates a color value using the RGB color class, assigns the color to the variable
theTextColor, and then uses the variable to set the text color to the RGB color.
tell application "Adobe Photoshop CS2"
mode of a document is RGB and you specify the color value for a stroke, foreground, or
background color property using a
CMYK color object, Adobe Photoshop CS2 translates the CMYK
color specification into an RGB color specification. The same thing happens if the document’s color
mode is CMYK and you specify colors using a
RGB color object. Since this translation can cause
information loss you should specify colors using the color class that matches the document’s color
mode.
real
real
real
real
activate
The cyan color value (as percent) (0.0 - 100.0).
The magenta color value (as percent) (0.0 100.0).
The yellow color value (as percent) (0.0 - 100.0).
The black color value (as percent) (0.0 - 100.0).
--create a variable named theDocRef
--assign the current (active) document to it
set theDocRef to the current document
--create a variable that contains a color object of the RGB color class
--whose color is red
set the
--create a variable for the text layer, create the layer as an art layer object
--and use the kind property of the art layer object to make it a text layer
set theTextLayer to make new art layer in theDocRef with¬
--Set the contents, size, position and color of the text layer
set contents of text object of theTextLayer to "Hello, World!"
set size of text object of theTextLayer to 36
set position of text object of theTextLayer to {0.75, 1}
set stroke color of text object of theTextLayer to theTextColor
end tell
TextColor to {class:RGB color, red:255, green:0, blue:0}
The color balance class specifies options for the adjustment options class to change the overall
mixture of colors in an image for generalized color correction.
color balance class, which is analogous to the Color Balance command in the Adobe Photoshop
The
CS2 application, is used only to define a record containing properties that specify options when applying a
Color Balance adjustment to an image. The
adjust command. It is not possible to get or create a color balance object.
See the
Properties
PropertyValue TypeWhat it is
adjust command for additional details.
color balance class can be used only in conjunction with the
shadows
list of integers
The list of adjustments for shadows (three values
(-100 - 100 required). The specified values indicate
the color levels for component colors of the
document mode, either RGB or CMYK. For CMYK
mode, the values represent C, M, and Y.
midtones
list of integers
The list of adjustments for midtones (three values
(-100 - 100 required). The specified values indicate
the color levels for component colors of the
document mode, either RGB or CMYK. For CMYK
mode, the values represent C, M, and Y.
highlights
list of integers
The list of adjustments for highlights (three values
(-100 - 100 required). The specified values indicate
the color levels for component colors of the
document mode, either RGB or CMYK. For CMYK
mode, the values represent C, M, and Y.
preserve luminosity
boolean
Indication of whether to preserve the image
luminosity.
The following code sample demonstrates how to apply a color balance adjustment using the adjust
command of the
color balance class (inherited from the adjustment options super class). This code
adjusts only the shadows in the image.
...
adjust current layer of the current document using color balance adjustment¬
with options {class:color balance, shadows: {45, 4,5}, preserve luminosity:false}
The curves class supplies options for the adjustment options class to adjust the tonal range of an
image. You can also use the curves object to make precise adjustments to individual color channels within
an image.
The
curves class, which is analogous to the Curves command in the Adobe Photoshop CS2 application, is
used only to define a record containing properties that specify options when applying a Curves
adjustment to an image. The
is not possible to get or create a
See the adjust command for additional details.
Properties
PropertyValue TypeWhat it is
curves class can be used only in conjunction with the adjust command. It
curves object.
curve points
list of lists
The list of lists of coordinates (x and y) that indicate
the points that describe the curve. (You must include
2 - 14 points).
Tip: For more information, please refer to Adobe
Photoshop CS2 Help.
The following code sample demonstrates how to apply a Curves adjustment using the adjust command
curves class (inherited from the adjustment options super class).
of the
...
adjust current layer of the current document using curves adjustment¬
Options that may be supplied when applying a De-Interlace filter.
deinterlace class supplies properties for the filter options class. The deinterlace class is used
The
only to define a record whose properties specify options when applying a De-Interlace filter.
options can be supplied only in conjunction with the filter command. It is not possible to get or create a
deinterlace object.
See the filter command for additional details.
Properties
PropertyValue TypeWhat it is
deinterlace
eliminate
create new fields by
Valid values:
even fields
odd fields
Valid values:
duplication
interpolation
The type of fields to eliminate.
The method to use to create new fields.
The following code sample demonstrates how to apply the De-Interlace filter using the filter command
deinterlace class (inherited from the filter options super class).
of the
...
filter current layer of the current document using deinterlace filter ¬
with options {class:deinterlace, eliminate:odd fields¬
create new fields by:duplication}
The desaturate class supplies options for the adjustment options class to convert a color image to a
grayscale image in the current color mode by assigning equal values of each component color to each
pixel.
The
desaturate class, which is analogous to the Desaturate command in the Adobe Photoshop CS2
application, is used only to define a record containing properties that specify options when using the
adjust command to apply a desaturation adjustment to a selected layer. The desaturate class can be
used only in conjunction with the
object.
See the
adjust command for additional details.
adjust command. It is not possible to get or create a desaturate
The following code sample demonstrates how to apply a Desaturate adjustment using the
command of the
...
adjust current layer of the current document using desaturate adjustment¬
with options {class:desaturate}
desaturate class (inherited from the adjustment options super class).
Options that can be specified when saving a document in EPS format. See the save command for
additional details.The
This class is used to define a record containing properties used to specify options when saving a document
as an EPS file.
possible to get or create an
Properties
PropertyValue TypeWhat it is
EPS save options can only be supplied in conjunction with the save command. It is not
EPS save options class inherits properties from the save optionsclass.
EPS save options object.
embed color profile
encoding
halftone screen
image interpolation
PostScript color
management
preview type
boolean
Valid Values:
ASCII
binary
high quality JPEG
low quality JPEG
maximum quality JPEG
medium quality JPEG
boolean
boolean
boolean
Valid Values:
eight bit Mac OS
eight bit TIFF
JPEG Mac OS
monochrome Mac OS
monochrome TIFF
none
Indication of whether to embed the color
profile in the document.
The type of encoding to use (default: binary).
Indication of whether to include the halftone
screen (default:
false).
Indication of whether to use image
interpolation (default:
false).
Indication of whether to use Postscript color
management (default:
false).
The preview type (default: monochrome TIFF).
transfer function
transparent whites
vector data
boolean
boolean
boolean
Indication of whether to include the Transfer
functions to compensate for dot gain between
the image and film (default:
false).
Indication of whether to display white areas as
transparent.
The following code creates the myOptions variable to hold the EPS save options, then uses the save
command to save the document with the specified options.
tell application "Adobe Photoshop CS2"
make new document
set myOptions to {class:EPS save options, ¬
embed color profile: true}
save current document in file myFile as Photoshop EPS with options ¬
The equalize class supplies options for the adjustment options class to convert a color image to
redistribute the brightness values of the pixels in an image so that they more evenly represent the entire
range of brightness levels.
The
equalize class, which is analogous to the Equalize command in the Adobe Photoshop CS2
application, is used only to define a record containing properties that specify options when using the
adjust command to apply an Equalize adjustment to a selected area. The equalize class can be used
only in conjunction with the
See the adjust command for additional details.
adjust command. It is not possible to get or create an equalize object.
The following code sample demonstrates how to apply a Equalize adjustment using the
of the
equalize class (inherited from the adjustment options super class).
...
adjust current layer of the current document using equalize adjustment¬
An installed font. The font object is an element of the application class. You use the font object to
retrieve information about the fonts installed on your computer. See
more information.
Properties
PropertyValue TypeWhat it is
‘application’ on page 13 for
best type
class type
default type
index
properties
type class
class
type class
integer
record
Read-only. The best type for the object's value.
The object’s class.
Read-only. The default type for the object's value.
Read-only. The index of this instance of the object.
All of this objects properties returned in a single
record.
family
name
PostScript name
style
Unicode text
Unicode text
Unicode text
Unicode text
Read-only. The font family.
The text face name.
The font's PostScript name.
The font’s style name.
The following code uses the standard AppleScript commands get and prompt to display a dialog that lists
the fonts installed on the computer running the script.
tell application "Adobe Photoshop CS2"
set fontsInstalled to get fonts
prompt(fontsInstalled)
Options that can be specified when saving a document in GIF format. See the save command for
additional details.The
This class is used to define a record containing properties used to specify options when saving a document
as a GIF file.
possible to get or create a GIF
Properties
PropertyValue TypeWhat it is
GIF save options can only be supplied in conjunction with the save command. It is not
GIF save options class inherits properties from the save optionsclass.
save options object.
colors in palette
dither
dither amount
forced colors
integer
Valid values:
diffusion
noise
none
pattern
integer
Valid values:
black and white
none
primaries
web
The number of colors in the Color palette.
Note: Valid only when
adaptive
palette: local perceptual;
palette: local selective;
palette: Mac OS system; palette:
uniform
palette: web; or palette: Windows
system
See
;
.
palette.
palette: local
;
The dither type to use.
The amount of dither to use (1 - 100).
Note: Valid only when
dither.
See
dither: diffusion.
Forces the inclusion of specified colors.
interlaced
matte background
color
boolean
Valid values:
matte
black matte
foreground color matte
Netscape gray
none
semi gray
white matte
Indication of whether to interlace rows
(default:
false).
The color to use to fill antialiased edges
adjacent to transparent areas of the image
(default:
exact
local adaptive
local perceptual
local selective
Mac OS system
master adaptive
master perceptual
master selective
previous
uniform
web
Windows system
boolean
The type of palette to use (default: exact).
Indication of whether to protect colors in the
image that contain entries in the color table
from being dithered.
dither: diffusion.
transparency
boolean
Note: Valid only when
dither.
See
Indication of whether to preserve
transparent areas of the image during
conversion to GIF format.
The following code creates the myOptions variable to hold the GIF save options, then uses the save
command to save the document with the specified options.
tell application "Adobe Photoshop CS2"
make new document
set myOptions to {class:GIF save options, ¬
dither: diffusion, dither amount: 46¬
preserve exact colors: true, matte background color: foreground color matte}
save current document in file myFile as Compuserve GIF with options ¬
Options that may be supplied when applying a Glass filter.
glass filter class supplies properties for the filter options class. The glass filter class is
The
used only to define a record whose properties specify options when applying a Glass filter.
options can be supplied only in conjunction with the filter command. It is not possible to get or create a
glass filter object.
See the filter command for additional details.
Properties
PropertyValue TypeWhat it is
glass filter
distortion
smoothness
scaling
invert texture
texture kind
texture definition
integer
integer
integer
boolean
Valid values:
blocks
canvas
frosted
texture document
tiny lens
alias
(0 - 20)
(1 - 15)
(50 - 200) as percent.
(default: false)
The type of texture to use.
The file that contains the texture image.
The following code sample demonstrates how to apply the Glass filter using the filter command of the
glass class (inherited from the filter options super class).
...
filter current layer of the current document using glass filter ¬
Options that can be specified for a Gray color: the numeric values of component colors. The Gray color
class inherits properties from the color value class.
This class a property of the color value object and is used to define a record that specifies options when
creating color value.
Options that can be specified for an HSB color: the numeric values of component colors. The HSB color
class inherits properties from the color value class.
This class a property of the color value object and is used to define a record that specifies options when
creating color value.
Options that can be specified when changing the document mode to Indexed using the change mode
command. The
This class is used to define a record containing properties used to specify options when changing a
document’s mode.
command. It is not possible to get or create a
command for more details.
Properties
PropertyValue TypeWhat it is
indexed mode class inherits properties from the change mode options class.
Indexed mode options can only be supplied in conjunction with the change mode
Indexed mode options object. See the change mode
colors in palette
dither
dither amount
forced colors
integer
Valid values:
diffusion
noise
none
pattern
integer
Valid values:
black and white
none
primaries
web
The number of colors in the Color palette.
Note: Valid only when
palette: local adaptive;
palette: local perceptual;
palette: local selective;
palette: Mac OS system;
palette: uniform;
palette: web; or
palette: Windows system.
palette.
See
The dither type to use.
The amount of dither to use (1 - 100).
Note: Valid only when
dither: diffusion.
The type of colors to force into the color
palette.
matte background
color
Valid values:
matte
black matte
foreground color matte
Netscape gray
none
semi gray
white matte
The color to use to fill antialiased edges
adjacent to transparent areas of the image
(default:
exact
local adaptive
local perceptual
local selective
Mac OS system
master adaptive
master perceptual
master selective
previous
uniform
web
Windows system
boolean
boolean
The type of palette to use (default: local
selective
).
Indication of whether to protect colors in the
image that contain entries in the color table
from being dithered.
Note: Valid only when
dither: diffusion. See dither.
Indication of whether to preserve transparent
areas of the image during conversion to GIF
format.
Document metadata.This class is a property of the document object and is used to define a record
containing properties that specify application preferences. See
Properties
PropertyValue TypeWhat it is
‘document, documents’ on page 47.
best type
class type
default type
properties
author
author position
caption
caption writer
category
city
container
copyright notice
copyrighted
type class
class
type class
record
Unicode text
Unicode text
Unicode text
Unicode text
Unicode text
Unicode text
reference
Unicode text
Valid values:
copyrighted work
public domain
unmarked
Read-only. The best type for the object's value.
The object’s class.
Read-only. The default type for the object's value.
All of this objects properties returned in a single
record.
Read-only. The object’s container.
The document’s copyrighted status.
country
creation date
credit
EXIF
headline
instructions
job name
keywords
owner url
Unicode text
Unicode text
Unicode text
list of lists:
list (list {tag,
tag data}}, ...
Unicode text
Unicode text
Unicode text
list of Unicode
text
Unicode text
Read-only. Camera data that includes camera
settings used when the image was taken. Sample list
values are: tag = “camera”; tag value = “Cannon”.
A list of keywords that can identify the document or
its contents.
Options that can be specified when saving a document in JPEG format. See the save command for
additional details.The
This class is used to define a record containing properties used to specify options when saving a document
as a JPEG file.
possible to get or create a
Properties
PropertyValue TypeWhat it is
JPEG save options can only be supplied in conjunction with the save command. It is not
JPEG save options class inherits properties from the save optionsclass.
JPEG save options object.
embed color
profile
format options
matte background
color
quality
scans
boolean
Valid values:
optimized
progressive
standard
Valid values:
matte
black matte
foreground color matte
Netscape gray
none
semi gray
white matte
integer
integer
Indication of whether to embed the color profile
in the document.
The download format to use (default:
standard).
The color to use to fill antialiased edges adjacent
to transparent areas of the image (default:
white matte).
Note: When
transparency: false, the matte
color is applied to transparent areas. See
‘transparency’ on page 77.
The quality of the produced image (0 - 12;
default:
3).
The number of increasingly detailed scans to
use to display the image on the screen (3 - 5).
Note: Valid only when
progressive
format options:
. See format options.
The following code creates the myOptions variable to hold the JPEG save options, then uses the save
command to save the document with the specified options.
tell application "Adobe Photoshop CS2"
make new document
set myOptions to {class:JPEG save options, ¬
embed color profile: true, format options: progressive, scans: 3}
save current document in file myFile as JPEG with options ¬
Options that can be specified for an Lab color: numeric values for the component colors. The Lab color
class inherits properties from the color value class.
This class a property of the color value object and is used to define a record that specifies options when
creating color value.
A layer object. The following classes inherit properties from the layer class: art layer, art layers,
layer set, layer sets.
Properties
PropertyValue TypeWhat it is
best type
class type
default type
index
properties
all locked
blend mode
type class
class
type class
integer
record
boolean
Valid Values:
color blend
color burn
color dodge
darken
difference
dissolve
exclusion
hard light
hue blend
lighten
linear burn
linear dodge
linear light
luminosity
multiply
normal
overlay
pass through
pin light
saturation blend
screen
soft light
vivid light
Read-only. The best type for the object's value.
Read-only. The object’s class.
Read-only. The default type for the object’s value.
Read-only. The index of this instance of the object.
Read-only. All of this object’s properties returned in a
single record.
Read-only. Indication of whether all of the layer’s
contents are locked or editable.
The mode to use when compositing an object.
bounds
container
linked layers
name
opacity
visible
list
reference
list of layers
Unicode text
real
boolean
Read-only. A list of coordinates that describe the
corners of the bounding rectangle of the layer.
Read-only. The object’s container.
Read-only. The layers linked to this layer.
The layer’s name.
The layer’s master opacity (as percent) (0.0 - 100.0).
color blend
color burn
color dodge
darken
difference
dissolve
exclusion
hard light
hue blend
lighten
linear burn
linear dodge
linear light
luminosity
multiply
normal
overlay
pass through
pin light
saturation blend
screen
soft light
vivid light
list
reference
(Inherited from the layer class) The mode to use
when compositing an object.
Read-only. (Inherited from the layer class) The
bounding rectangle of the layer.
Read-only. (Inherited from the layer class) The
object’s container.
linked layers
name
opacity
visible
enabled channels
Valid Commands
delete
duplicate
exists
index
link
make
merge
move
rotate
scale
translate
list of layers
Unicode text
real
boolean
list of channels
Read-only. (Inherited from the layer class) The
layers linked to this layer set.
(Inherited from the layer class) The layer set’s name.
(Inherited from the layer class) The layer set’s
master opacity (0.0 - 100.0).
(Inherited from the layer class) Indication of
whether the layer set is visible.
Options that may be supplied when applying a Lens Flare filter.
lens flare class supplies properties for the filter options class. The lens flare class is used
The
only to define a record whose properties specify options when applying a Lens Flare filter.
options can be supplied only in conjunction with the filter command. It is not possible to get or create a
lens flare object.
See the filter command for additional details.
Properties
PropertyValue TypeWhat it is
lens flare
brightness
flare center
integer
list
(10 - 300) as percent.
The x and y coordinates of the center of the flare
(unit value).
lens type
Valid values:
Movie Prime
Prime 105
Prime 35
zoom
The following code sample demonstrates how to apply the Lens Flare filter using the filter command of
lens flare class (inherited from the filter options super class).
the
...
filter current layer of the current document using lens flare filter ¬
with options {class:lens flare, brightness:209, flare center: {2 as inches,¬
4 as inches}, lens type:Prime 35}
The mix channels class supplies options for the adjustment options class to modify a targeted
(output) color channel using a mix of the existing color channels in the image.
mix channels class, which is analogous to the Channel Mixer command in the Adobe Photoshop CS2
The
application, is used only to define a record containing properties that specify options when applying a
Channel Mixer adjustment to an image. The
adjust command. It is not possible to get or create a mix channels object.
See the
Note: Valid only for RGB or CMYK documents.
Properties
PropertyValue TypeWhat it is
adjust command for additional details.
mix channels class can be used only in conjunction with the
output channels
list of anything
A list of channel specifications. For each component
channel, you must specify a list of adjustment values
(-200 - 200) followed by a 'constant' value (-200 -
200).
Note: When
monochrome mixing: true, the
maximum number of channel value
specifications is 1.
Note: Valid only when the document mode is RGB or
mode in the Properties table of the
monochrome mixing
boolean
CMYK. See
document, documents class.
Indication of whether to use monochrome mixing
(default:
false).
The following code sample demonstrates how to apply a Mix Channels adjustment using the adjust
command of the
assumes an RGB document mode and uses the default value for the
mix channels class (inherited from the adjustment options super class). This code
monochrome mixing property by not
specifying a value.
...
adjust current layer of the current document using mix channels adjustment¬
with options {class:mix channels, output channels:{red:{-42, 62, 5, 116},
Options that may be supplied when applying a Motion Blur filter.
motion blur class supplies properties for the filter options class. The motion blur class is used
The
only to define a record whose properties specify options when applying a Motion Blur filter.
options can be supplied only in conjunction with the filter command. It is not possible to get or create a
motion blur object.
See the filter command for additional details.
Properties
PropertyValue TypeWhat it is
motion blur
angle
radius
integer
real
(angle: -360 - 360)
(radius: 1 - 999) in pixels.
The following code sample demonstrates how to apply the Motion Blur filter using the filter command
of the
motion blur class (inherited from the filter options super class).
...
filter current layer of the current document using motion blur filter ¬
with options {class:motion blur, angle: -224, radius:29}