Macromedia Photoshop - CS2 User Guide

®
®
2
cs
Photoshop
AppleScript Scripting Reference
Adobe
bbc
© 2005 Adobe Systems Incorporated. All rights reserved.
®
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.

Contents

1 Introduction ................................................................................................................................. 8
Changes Since Earlier Versions.................................................................................................................................................. 8
2 Action Manager ........................................................................................................................... 9
Running JavaScript based Action Manager code from AppleScript............................................................................ 9
3 AppleScript Objects................................................................................................................... 10
add noise .........................................................................................................................................................................................11
adjustment options .....................................................................................................................................................................12
application......................................................................................................................................................................................13
art layer, art layers ........................................................................................................................................................................15
automatic contrast.......................................................................................................................................................................18
automatic levels............................................................................................................................................................................19
batch options.................................................................................................................................................................................20
Bitmap mode options.................................................................................................................................................................22
blur.....................................................................................................................................................................................................23
blur more.........................................................................................................................................................................................24
BMP save options .........................................................................................................................................................................25
brightness and contrast.............................................................................................................................................................27
camera raw open options .........................................................................................................................................................28
change mode options ................................................................................................................................................................30
channel, channels.........................................................................................................................................................................31
clouds ...............................................................................................................................................................................................33
CMYK color......................................................................................................................................................................................34
color balance..................................................................................................................................................................................35
color value.......................................................................................................................................................................................36
contact sheet options.................................................................................................................................................................37
curves................................................................................................................................................................................................39
custom filter ...................................................................................................................................................................................40
deinterlace......................................................................................................................................................................................41
desaturate .......................................................................................................................................................................................42
despeckle ........................................................................................................................................................................................43
difference clouds..........................................................................................................................................................................44
diffuse glow....................................................................................................................................................................................45
displace filter..................................................................................................................................................................................46
document, documents...............................................................................................................................................................47
dust and scratches .......................................................................................................................................................................51
EPS open options .........................................................................................................................................................................52
EPS save options...........................................................................................................................................................................53
equalize............................................................................................................................................................................................55
export options save for web.....................................................................................................................................................56
filter options...................................................................................................................................................................................58
font, fonts........................................................................................................................................................................................59
gallery banner options ...............................................................................................................................................................60
gallery color options ...................................................................................................................................................................61
gallery images options ...............................................................................................................................................................62
3
Adobe Photoshop CS2
AppleScript Scripting Reference 4
gallery options...............................................................................................................................................................................63
gallery security options..............................................................................................................................................................65
gallery thumbnail options.........................................................................................................................................................66
Gaussian blur .................................................................................................................................................................................67
GIF save options............................................................................................................................................................................68
glass filter ........................................................................................................................................................................................70
gray color.........................................................................................................................................................................................71
high pass..........................................................................................................................................................................................72
history state, history states .......................................................................................................................................................73
HSB color .........................................................................................................................................................................................74
Illustrator paths export options ..............................................................................................................................................75
indexed mode options ...............................................................................................................................................................76
info-object.......................................................................................................................................................................................78
inversion ..........................................................................................................................................................................................80
JPEG save options ........................................................................................................................................................................81
Lab color ..........................................................................................................................................................................................82
layer, layers .....................................................................................................................................................................................83
layer comp, layer comps............................................................................................................................................................85
layer set, layer sets .......................................................................................................................................................................86
lens blur ...........................................................................................................................................................................................89
lens flare...........................................................................................................................................................................................91
levels adjustment .........................................................................................................................................................................92
maximum filter..............................................................................................................................................................................93
median noise..................................................................................................................................................................................94
minimum filter...............................................................................................................................................................................95
mix channels ..................................................................................................................................................................................96
motion blur.....................................................................................................................................................................................97
no color ............................................................................................................................................................................................98
notifier, notifiers............................................................................................................................................................................99
NTSC colors.................................................................................................................................................................................. 100
ocean ripple................................................................................................................................................................................. 101
offset filter.................................................................................................................................................................................... 102
open options............................................................................................................................................................................... 103
path item, path items............................................................................................................................................................... 104
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
picture package options......................................................................................................................................................... 121
pinch .............................................................................................................................................................................................. 123
Pixar save options ..................................................................................................................................................................... 124
PNG save options ...................................................................................................................................................................... 125
polar coordinates ...................................................................................................................................................................... 126
posterize ....................................................................................................................................................................................... 127
presentation options...........................................................................................................
..................................................... 128
Adobe Photoshop CS2
AppleScript Scripting Reference 5
radial blur ..................................................................................................................................................................................... 130
raw format open options........................................................................................................................................................ 131
raw save options........................................................................................................................................................................ 132
RGB color ...................................................................................................................................................................................... 133
RGB hex color.............................................................................................................................................................................. 134
ripple.............................................................................................................................................................................................. 135
save options ................................................................................................................................................................................ 136
selection-object ......................................................................................................................................................................... 137
selective color............................................................................................................................................................................. 138
settings-object ........................................................................................................................................................................... 139
SGI RGB save options ............................................................................................................................................................... 143
sharpen ......................................................................................................................................................................................... 144
sharpen edges ............................................................................................................................................................................ 145
sharpen more.............................................................................................................................................................................. 146
shear............................................................................................................................................................................................... 147
smart blur..................................................................................................................................................................................... 148
spherize......................................................................................................................................................................................... 149
sub path info............................................................................................................................................................................... 150
sub path item, sub path items.............................................................................................................................................. 151
Targa save options.................................................................................................................................................................... 152
text-object.................................................................................................................................................................................... 153
texture fill ..................................................................................................................................................................................... 161
threshold adjustment .............................................................................................................................................................. 162
TIFF save options....................................................................................................................................................................... 163
twirl................................................................................................................................................................................................. 165
unsharp mask.............................................................................................................................................................................. 166
wave filter..................................................................................................................................................................................... 167
XMP metadata ............................................................................................................................................................................ 168
zigzag............................................................................................................................................................................................. 169
4 AppleScript Commands .......................................................................................................... 170
Overview....................................................................................................................................................................................... 170
activate.......................................................................................................................................................................................... 171
adjust ............................................................................................................................................................................................. 172
apply .............................................................................................................................................................................................. 173
apply layer style ......................................................................................................................................................................... 174
change mode.............................................................................................................................................................................. 175
close ............................................................................................................................................................................................... 176
clear................................................................................................................................................................................................ 177
contract......................................................................................................................................................................................... 178
convert .......................................................................................................................................................................................... 179
convert color............................................................................................................................................................................... 179
convert to shape........................................................................................................................................................................ 179
copy................................................................................................................................................................................................ 180
copy merged............................................................................................................................................................................... 180
count.............................................................................................................................................................................................. 181
create PDF presentation ......................................................................................................................................................... 182
create photo gallery ................................................................................................................................................................. 182
create selection.......................................................................................................................................................................... 182
create work path........................................................................................................................................................................ 183
crop................................................................................................................................................................................................. 184
Adobe Photoshop CS2
AppleScript Scripting Reference 6
cut ................................................................................................................................................................................................... 185
delete............................................................................................................................................................................................. 186
deselect......................................................................................................................................................................................... 187
do action....................................................................................................................................................................................... 188
do javascript................................................................................................................................................................................ 189
duplicate....................................................................................................................................................................................... 190
equal colors ................................................................................................................................................................................. 191
exists .............................................................................................................................................................................................. 192
expand........................................................................................................................................................................................... 193
export ............................................................................................................................................................................................ 194
feather ........................................................................................................................................................................................... 195
fill..................................................................................................................................................................................................... 196
fill path .......................................................................................................................................................................................... 196
filter ................................................................................................................................................................................................ 198
flatten ............................................................................................................................................................................................ 199
flip canvas .................................................................................................................................................................................... 200
grow ............................................................................................................................................................................................... 201
import annotations................................................................................................................................................................... 202
index .............................................................................................................................................................................................. 203
invert.............................................................................................................................................................................................. 204
link .................................................................................................................................................................................................. 205
load................................................................................................................................................................................................. 206
make............................................................................................................................................................................................... 207
make clipping path................................................................................................................................................................... 207
make work path ......................................................................................................................................................................... 208
merge............................................................................................................................................................................................. 209
merge visible layers.................................................................................................................................................................. 209
move .............................................................................................................................................................................................. 210
open ............................................................................................................................................................................................... 211
paste............................................................................................................................................................................................... 212
print................................................................................................................................................................................................ 213
purge.............................................................................................................................................................................................. 214
quit.................................................................................................................................................................................................. 215
rasterize......................................................................................................................................................................................... 216
recapture ...................................................................................................................................................................................... 217
reset from comp ........................................................................................................................................................................ 218
resize canvas ............................................................................................................................................................................... 219
resize image................................................................................................................................................................................. 219
reveal all........................................................................................................................................................................................ 220
rotate ............................................................................................................................................................................................. 221
rotate boundary......................................................................................................................................................................... 221
rotate canvas............................................................................................................................................................................... 221
save................................................................................................................................................................................................. 223
scale................................................................................................................................................................................................ 225
scale boundary........................................................................................................................................................................... 225
select.............................................................................................................................................................................................. 226
select all ........................................................................................................................................................................................ 226
select border ............................................................................................................................................................................... 226
similar ............................................................................................................................................................................................ 227
smooth .......................................................................................................................................................................................... 228
split channels .................................................................................................................
............................................................. 229
Adobe Photoshop CS2
AppleScript Scripting Reference 7
store................................................................................................................................................................................................ 230
stroke ............................................................................................................................................................................................. 231
stroke path................................................................................................................................................................................... 231
translate ........................................................................................................................................................................................ 232
translate boundary ................................................................................................................................................................... 233
trap ................................................................................................................................................................................................. 234
trim ................................................................................................................................................................................................. 235
unlink ............................................................................................................................................................................................. 236
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.
Element Refer to by
channel

Properties

Property Value Type What 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.
The selected channels.
The selected layer.
Read-only. The document metadata.
10
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 11

add noise

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

Property Value Type What 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}
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 12

adjustment options

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,
desaturate, equalize, inversion, levels adjustment, mix channels, posterize, selective color, threshold adjustment.
Valid Commands
adjust
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 13

application

The Adobe Photoshop CS2 application object, which contains all other Adobe Photoshop CS2 objects.

Elements

Elements Refer to by
document name, numeric index, as a range of elements, before/
after another element, satisfying a test
font name, numeric index, as a range of elements, before/

Properties

Property Value type What it is
best type
class
default type
properties
background color
color settings
current document
display dialogs
after another element, satisfying a test
type class
type class
type class
record
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.
All of this object's properties returned in a single record.
color value
string or color object
document
Valid Values:
always error dialogs never
The color for the document’s background color.
The name of selected color setting’s set.
The frontmost document.
Controls whether and dialogs are displayed while the script is running.
foreground color
free memory
frontmost
locale
name
preferences folder
scripting version
color value
real
boolean
string
Unicode text
alias
Unicode text
The default foreground color (used to fill and stroke selections).
Read-only. The amount of unused memory available to Adobe Adobe Photoshop CS2.
Read-only. Indication of whether Adobe Photoshop CS2 is the frontmost application.
Read-only. The language location of the application.
Read-only. The application's name.
Read-only. The full path to the Preferences folder.
Read-only. The scripting interface version.
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 14
Property Value type What it is (Continued)
settings
settings-object
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
application.
tell application "Adobe Photoshop CS2"
activate
end tell
Valid Commands
activate quit
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 15

art layer, art layers

Any layer that can contain data. The art layer class inherits properties from the layer, layers class.

Properties

Property Value Type What 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.
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 16
Property Value Type What it is (Continued)
linked layers
name
opacity
visible
background layer
fill opacity
grouped
kind
list of layers
Unicode text
real
boolean
boolean
real
boolean
Valid Values:
brightness contrast layer channel mixer layer color balance layer curves layer gradient fill layer gradient map layer hue saturation layer inversion layer levels layer normal pattern fill layer posterize layer smart object layer selective color layer solid fill layer text layer threshold layer
Read-only. (Inherited from the layer class) The layers linked to this layer.
(Inherited from the layer class) The layer’s name.
(Inherited from the layer class) The layer’s master opacity (0.0 - 100.0).
(Inherited from the layer class) Indication of whether the layer is visible.
Indication of whether the layer is a background layer.
The layer’s interior opacity (0.0 - 100.0).
Indication of whether the layer is grouped with the layer below.
Sets the layer’s kind (such as 'text layer').
Note: You can use the
kind property to make
a background layer a normal layer; however, to make a layer a background layer, you must use
background layer.
Note: Valid only when the layer is empty and
background layer is false. See
when
background layer.
pixels locked
position locked
text object
transparent position locked
Valid Commands
adjust apply layer style clear
boolean
boolean
text-object
boolean
Indicates whether the pixels in the layer’s image can be edited using the paintbrush tool.
Indicates whether the pixels in the layer’s image can be moved within the layer.
Read-only. The text item that is associated with the art layer.
Note: Valid only when
kind: text layer.
Indicates whether editing is confined to the opaque portions of the layer.
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 17
copy copy merged count cut delete duplicate exists filter index invert link make merge move rasterize rotate scale translate unlink
The following code creates a text layer by creating an art layer and setting its kind property to text
layer
, 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"
activate
--create a variable named theDocRef
--assign the current (active) document to it set theDocRef to the current document
--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¬
properties {kind:text layer}
end tell
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 18

automatic contrast

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
automatic contrast object.
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 19

automatic levels

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).
adjust
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 20

batch options

Options to specify when running a Batch command.

Properties

Property Value type What it is
destination
destination folder
error file
file naming
Valid values:
folder
no destination
save and close
alias
alias
Valid values:
ddmm ddmmyy documentnamelower documentnamemixed documentnameupper extensionlower extensionupper mmdd mmddyy serialletterlower serialletterupper serialnumber1 serialnumber2 serialnumber3 serialnumber4 yyddmm yymmdd yyyymmdd
The type of destination for the processed files (default:
no destination).
The folder location for the processed files.
Note: Valid only when
destination.
See
destination: folder.
The file in which to log errors encountered.
Note: To display errors on the screen (and stop
batch processing when errors occur) leave blank.
A list of file naming options (maximum: 6).
Note: Valid only when
destination.
See
destination:folder.
macintoshCompatible
overrideOpen
boolean
boolean
Indication of whether to make the final file nameS Macintosh compatible (default:
Note: Valid only when
destination.
See
destination:folder.
true).
Indication of whether to override action open commands (default:
false).
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 21
Property Value type What it is (Continued)
overrideSave
startingSerial
suppressOpen
suppressProfile
typename
unixCompatible
boolean
number (long)
boolean
boolean
string
boolean
Indication of whether to override save as action steps with the specified destination (default:
false).
Note: Valid only when
destination:save and close
See
destination.
destination:folder or
.
The starting serial number to use in naming files (default:
Note: Valid only when
1).
destination.
See
destination:folder.
Indication of whether to suppress the file open options dialogs (default:
false).
Indication of whether to suppress the color profile warnings (default:
false).
Read-only. The class name of the referenced
batchOptions object.
Indication of whether to make the final file name Unix compatible (default:
true).
windowsCompatible
boolean
Note: Valid only when
destination.
See
destination:folder.
Indication of whether to make the final file names Windows compatible (default:
Note: Valid only when
See
destination.
destination:folder.
true).
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 22

Bitmap mode options

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

Properties Value Type What it is
bitmap mode class inherits properties from the change mode options class.
Bitmap mode options can only be supplied in conjunction with the change mode
Bitmap mode options object. See the change mode
angle
conversion method
frequency
pattern name
resolution
real
Valid Values:
custom pattern diffusion dither halftone screen conversion middle threshold pattern dither
real
Unicode text
real
The angle (in degrees) at which to orient individual dots (-180 - 180). See
shape.
Note: Valid only when
method: halftone screen
conversion
screen
.
The conversion method to use (default:
diffusion dither).
The number of printer dots (per inch) to use (1.0 - 999.99).
Note: Valid only when
method: halftone screen
conversion
.
The name of the pattern to use.
Note: Valid only when
method: custom pattern
conversion
.
The output resolution (in pixels per inch) (default:
72.0).
screen shape
Valid values:
halftone cross halftone diamond halftone ellipse halftone line halftone round halftone square
The dot shape to use.
Note: Valid only when
method: halftone screen
conversion
.
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 23

blur

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}
blur
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 24

blur more

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
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 25

BMP save options

Options that can be specified when saving a document in BMP 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 BMP file. possible to get or create a

Properties

Property Value Type What it is
BMP save options can only be supplied in conjunction with the save command. It is not
BMP save options class inherits properties from the save options class.
BMP save options object.
bits per sample
flipped row order
RLE compression
Valid values:
A1R5G5B5 A4R4G4B4 A8R8G8B8 eight four one R5G6B5 R8G8B8 sixteen thirty two twenty four X1R5G5B5 X4R4G4B4 X8R8G8B8
boolean
boolean
The number of bits per channel (default: twenty
four
).
Indication of whether to write the image from top to bottom (default:
Note: Available only when
system: windows
system.
false).
target operating
. See target operating
Indication of whether to use RLE compression.
Note: Available only when
system: windows
system.
target operating
. See target operating
save alpha channels
target operating system
boolean
OS2 Windows
Indication of whether to save the alpha channels.
The target OS (default: Windows).
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 26
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 ¬
myOptions appending no extension without copying
end tell
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 27

brightness and contrast

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

Property Value Type What 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¬
with options {class:brightness and contrast}
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 28

camera raw open options

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

Property Value type What 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).
The saturation of the shot (-100 - 100).
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 29
Property Value type What it is (Continued)
settings
shadows
shadowTint
sharpness
size
temperature
tint
typename
vignettingAmount
Valid values:
CAMERA CUSTOM SELECTEDIMAGE
integer
integer
integer
Valid values:
EXTRALARGE LARGE MAXIMUM MEDIUM MINIMUM SMALL
integer
integer
string
integer
The global settings for all Camera RAW options.
The shadows of the shot (0 - 100).
The shadow tint of the shot (-100 - 100).
The sharpness of the shot (0 - 100).
The size of the new document.
The temperature of the shot (2000 - 50000).
The tint of the shot (-150 - 150).
Read-only. The class name of the referenced
cameraRawOpenOptions object.
The vignetting amount of the shot (-100 - 100).
vignettingMidpoint
integer
The vignetting mid point of the shot (-100 -
100).
whiteBalance
Valid values:
ASSHOT AUTO CLOUDY CUSTOM DAYLIGHT FLASH FLUORESCENT SHADE TUNGSTEN
The white balance options for the image.
The following code opens a camera raw document.
tell application "Adobe Photoshop CS2"
set myFilePath to alias “Applications:CRAWFiles:MyFile.jpeg” open myFilePath as camera raw with options ¬
{class:camera raw open options, bits per channel:eight, ¬ color noise reduction:20, temperature:47, ¬ white balance:cloudy}
end tell
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 30

change mode options

Options that can be supplied when changing a document’s mode using the change mode command. See
change mode for additional details.
The following classes inherit properties from the change mode options class: Bitmap mode options,
indexed mode options.
Valid Commands
change mode
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 31

channel, channels

A channel in a document. Can be either a component channel representing a color of the document color model or an alpha channel

Properties

Property Value Type What it is
best type
class type
default type
index
properties
channel color
container
histogram
type class
class
type class
integer
record
color value
reference
list of integers
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.
The channel’s color.
Note: Not valid when
kind.
See
kind: component channel.
The object’s container.
Read-only. A histogram of color values for the channel.
Note: Not valid when
kind: component channel. For component
component channel histogram values, use the
histogram property of the document object
instead. See
‘histogram’ on page 48.
kind
name
opacity
visible
Valid Commands
count delete duplicate exists index
Valid values:
component channel masked area channel selected area channel spot color channel
Unicode text
real
boolean
The type of channel.
The channel’s name.
The opacity (as percent) to use for alpha channels or the solidity to use for spot channels (0 - 100).
Note: Valid only when
kind: selected area.
kind: masked area or
Indication of whether the channel is visible.
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 32
make merge
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 33

clouds

Options that may be supplied when applying a Clouds filter.
clouds class supplies properties for the filter options class. The clouds class is used only to
The define a record when using the only in conjunction with the
See the
filter command for additional details.
The following code sample demonstrates how to apply the clouds filter using the filter command of the
clouds class (inherited from the filter options super class).
...
filter current layer of the current document using clouds filter
with options {class:clouds}
filter command to apply a Clouds filter. clouds options can be supplied
filter command. It is not possible to get or create a clouds object.
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 34

CMYK color

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

Property Value Type What 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}
properties {kind:text layer}
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 35

color balance

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

Property Value Type What 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}
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 36

color value

A color value. The following classes inherit properties from the color value class: CMYK color, gray
color, HSB color, Lab color, no color, RGB color, RGB hex color.
The following script creates an RGB color value to use as the fill color for the selection.
tell application "Adobe Photoshop CS2"
make new art layer at beginning of current document ¬
with properties {name:"MyBlendLayer", blend mode:normal} select all current document fill selection of current document with contents ¬
{class:RGB color, red:255, green:0, blue:0}
end tell
Valid Commands
convert color equal colors web safe color
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 37

contact sheet options

Options that can be specified for a contact sheet.

Properties

Property Value Type What it is
across first
best fit
caption
column count
flatten
font
font size
height
boolean
boolean
boolean
number (long)
boolean
Valid values:
arial couriernew helvetica timesnewroman
number (long)
number (long)
Indication of whether to place the images horizontally (left to right, then top to bottom) first (default:
true).
Indication of whether to rotate images for the best fit (default:
false).
Indication of whether to use the filename as a caption for the image (default:
true).
The number of columns to include (1 - 100; default:
5).
Indication of whether to flatten all layers in the final document (default:
true).
The font used for the caption (default: arial).
The font size to use for the caption (default: 12).
The height (in pixels) of the resulting document (100
- 2900; default:
720).
horizontal
mode
resolution
row count
typename
use auto spacing
number (long)
Valid values:
bitmap CMYK grayscale lab RGB
number (double)
number (long)
string
boolean
The horizontal spacing (in pixels) between images (0
- 29000; default:
1).
The document color mode (default: RGB).
The resolution of the document in pixels per inch (35
- 1200; default:
72.0).
The number of rows to use (1 - 100; default: 6).
Read-only. The class name of the referenced object.
Indication of whether to auto space the images (default:
true).
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 38
Property Value Type What it is (Continued)
vertical
width
number (long)
number (long)
The vertical spacing (in pixels) between images (0 ­29000; default:
Note: Valid only when
1).
use auto spacing: false.
The width (in pixels) of the resulting document (100
- 2900; default:
576).
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 39

curves

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

Property Value Type What 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¬
with options {class:curves, curve points:{45, 4}, {42, 9}, {40, 17}{36, 22}}
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 40

custom filter

Options that may be supplied when applying a Custom filter.
custom filter class supplies properties for the filter options class. The custom filter class is
The used only to define a record whose properties specify options when applying a Custom filter.
filter options can be supplied only in conjunction with the filter command. It is not possible to get or
create a
See the filter command for additional details.

Properties

Property Value Type What it is
custom filter object.
custom
characteristic
list of integers
The filter characteristics (array of 25 values; corresponds to a left to right, top to bottom traversal of the array presented in the user interface).
Note: Required parameter values define the filter.
Refer to Adobe Photoshop CS2 Help for specific instructions.
scaling
offset
integer
integer
The following code sample demonstrates how to apply a custom filter using the filter command of the
custom filter class (inherited from the filter options super class).
... filter current layer of the current document using custom filter ¬
with options {class:add noise, distribution:uniform ¬ monochromatic:false}
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 41

deinterlace

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

Property Value Type What 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}
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 42

desaturate

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).
adjust
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 43

despeckle

Options that may be supplied when applying a Despeckle filter.
despeckle class supplies properties for the filter options class. The despeckle class is used only
The to define a record whose properties specify options when using the Despeckle filter. not possible to get or create a
despeckle options can be supplied only in conjunction with the filter command. It is
despeckle object.
See the filter command for additional details.
The following code sample demonstrates how to apply the despeckle filter using the
despeckle filter class (inherited from the filter options super class).
the
...
filter current layer of the current document using despeckle filter
with options {class:despeckle}
filter command to apply a
filter command of
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 44

difference clouds

Options that may be supplied when applying a Difference Clouds filter.
difference clouds class supplies properties for the filter options class. The difference
The
clouds
command to apply a Difference Clouds filter. conjunction with the
See the filter command for additional details.
The following code sample demonstrates how to apply the difference clouds filter using the command of the
filter current layer of the current document using difference clouds filter
class is used only to define a record whose properties specify options when using the filter
difference clouds options can be supplied only in
filter command. It is not possible to get or create a difference clouds object.
filter
difference clouds class (inherited from the filter options super class).
...
with options {class:difference clouds}
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 45

diffuse glow

Options that may be supplied when applying a Diffuse Glow filter.
diffuse glow class supplies properties for the filter options class. The diffuse glow class is
The used only to define a record whose properties specify options when applying a Diffuse Glow filter.
diffuse glow options can be supplied only in conjunction with the filter command. It is not possible
to get or create a
See the filter command for additional details.

Properties

Property Value Type What it is
diffuse glow object.
graininess
glow amount
clear amount
integer
integer
integer
(0 - 10)
(0 - 20)
(0 - 20)
The following code sample demonstrates how to apply the diffuse glow filter using the filter command
diffuse glow class (inherited from the filter options super class).
of the
...
filter current layer of the current document using clouds filter
with options {class:clouds}
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 46

displace filter

Options that may be supplied when applying a Displace filter.
displace filter class supplies properties for the filter options class. The displace filter
The class is used only to define a record whose properties specify options when applying a Displace filter.
displace filter options can be supplied only in conjunction with the filter command. It is not
possible to get or create a
See the filter command for additional details.

Properties

Property Value Type What it is
displace filter object.
horizontal scale
vertical scale
kind
undefined areas
displacement map definition
integer
integer
Valid values:
stretch to fit tile
Valid values:
repeat edge pixels wrap around
alias
(-999 - 999)
(-999 - 999)
The displacement map type.
The method to use to treat undistorted areas.
The location of the desired displacement map.
The following code sample demonstrates how to apply the Displace filter using the filter command of
displace class (inherited from the filter options super class).
the
... filter current layer of the current document using displace filter ¬
with options {class:displace, horizontal scale:250¬ vertical scale:350, kind:tile, undefined areas:repeat edge pixels¬ displacement map definition:"Hard Disk:Photoshop CS 2:Displacement Maps:DM1"}
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 47

document, documents

The active containment object for layers and all other objects in the script; the basic canvas for the file.
Note: In Adobe Photoshop CS2, a document can also be referred to as an image or a canvas.

Elements

Element Refer to by
art layer
channel
history state
layer comp
layer
layer set
path item

Properties

name, numeric index, as a range of elements, before
after another element, satisfying a test
name, numeric index, as a range of elements, before
after another element, satisfying a test
name, numeric index, as a range of elements, before
after another element, satisfying a test
name, numeric index, as a range of elements, before
after another element, satisfying a test
name, numeric index, as a range of elements, before
after another element, satisfying a test
name, numeric index, as a range of elements, before
after another element, satisfying a test
name, numeric index, as a range of elements, before
after another element, satisfying a test
Property Value Type What it is
best type
class
default type
index
type class
type class
type class
integer
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.
properties
record
The object's properties returned in a single record.
background layer
art layer
Read-only. The background layer for the document.
Note: Valid only for documents that have a
background layer.
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 48
Property Value Type What it is (Continued)
bits per channel
color profile kind
color profile name
component channels
current channels
current history brush source
current history state
current layer
Valid values:
eight one sixteen
Valid values:
custom none working
Unicode text
list of channels
list of channel
history state
history state
layer
The number of bits per channel.
The type of color profile management for the document.
The name of color profile for the document.
Note: Valid only when
custom working
or color profile kind: .
color profile kind:
Read-only. A list of the component color channels.
The selected channels.
The current history state to use with the history brush.
The selected history state.
The selected layer.
file path
height
histogram
info
initial fill
managed
alias
real
list of 256 integers
info-object
Valid values:
transparent use background color white
boolean
Read-only. The full path name of the document.
Read-only. The document height (unit value).
Read-only. A histogram of values for the composite document.
Note: Valid only when
mode: CMYK; or mode: indexed color.
See
mode.
mode: RGB;
Read-only. The document metadata.
Read-only. The initial fill.
Note: Valid only when used as an option with the
'make new document' command. See
make.
Read-only. Indication of whether the document is a workgroup document.
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 49
Property Value Type What it is (Continued)
mode
modified
name
pixel aspect ratio
quick mask mode
resolution
selection
width
Valid values:
bitmap CMYK duotone grayscale indexed color Lab multichannel RGB
boolean
Unicode text
real
boolean
real
selection-object
real
Read-only. The color profile for the document.
Read-only. Indication of whether the document has been modified since the last save.
Read-only. The document’s name.
The (custom) pixel aspect ratio to use (0.100 -
10.000).
Indication of whether the document is in the quick mask mode.
Read-only. The document’s resolution (in pixels per inch).
Read-only. The selected area of the document.
Read-only. The document width (unit value).
XMP metadata
Valid Commands
change mode close convert count crop delete deselect duplicate exists expand export flatten flip canvas import annotations index make merge visible layers paste print resize canvas resize image reveal all rotate canvas
XMP metadata
Read-only. Camera raw settings for the image.
Note: Valid only for documents opened in
Camera Raw format.
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 50
save split channels trap trim
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 51

dust and scratches

Options that may be supplied when applying a Dust & Scratches filter.
dust and scratches class supplies properties for the filter options class. The dust and
The
scratches
Scratches filter. command. It is not possible to get or create a
See the filter command for additional details.

Properties

Property Value Type What it is
class is used only to define a record whose properties specify options when applying a Dust &
dust and scratches options can be supplied only in conjunction with the filter
dust and scratches object.
radius
threshold
integer
integer
(1 - 100) in pixels.
(0 - 255)
The following code sample demonstrates how to apply the Dust & Scratches filter using the filter command of the
... filter current layer of the current document using dust and scratches filter ¬
with options {class:dust and scratches, radius:15¬ threshold:212}
dust and scratches class (inherited from the filter options super class).
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 52

EPS open options

Settings related to opening a generic EPS document. The EPS open options class inherits properties from the
This class is used to define a record containing properties that specify options when opening a document in EPS format. possible to get or create a

Properties

Property Value Type What it is
open options class.
EPS open options can be supplied only in conjunction with the open command. It is not
EPS open options object.
constrain proportions
height
mode
resolution
use antialias
width
boolean
real
Valid values:
CMYK grayscale Lab RGB
real
boolean
real
Indication of whether to constrain the image proportions.
The image height (unit value).
The color profile to use as the document mode.
The resolution of the document (in pixels per inch).
Indication of whether to use antialias.
The image width (unit value).
The following code opens an EPS document.
tell application "Adobe Photoshop CS2"
set myFilePath to alias “Applications:EPSFiles:MyFile.eps” open myFilePath as EPS with options ¬
{class:EPS open options, height:pixels 100, ¬
width:pixels 200, mode:RGB, resolution:72, ¬
use antialias:true, constrain proportions:true}
end tell
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 53

EPS save options

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

Property Value Type What 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 options class.
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.
Note: Valid only when saving BitMap
documents.
Indication of whether to include vector data.
Note: Valid only if the document includes
vector data (text).
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 54
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 ¬
myOptions appending no extension without copying
end tell
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 55

equalize

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¬
with options {class:equalize, curve points:{45, 4}, {42, 9}, {40, 17}{36, 22}}
adjust command
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 56

export options save for web

Options that can be specified when optimizing a document for the web.

Properties

Property Value type What it is
blur
colorReduction
colors
dither
ditherAmount
real
Valid values:
adaptive blackwhite custom grayscale macintosh perceptual restrictive selective windows
integer
Valid values:
diffusion noise none pattern
integer
Applies blur to the image to reduce artifacts (default:
0.0).
The color reduction algorithm (default:
selective).
The number of colors in the palette (default: 256).
The type of dither (default: diffusion).
The amount of dither (default: 100).
Note: Valid only when
dither:diffusion. See dither.
format
Valid values:
aliaspix bmp compuservegif electricimage jpeg pcx photoshop photoshopdcs_1 photoshopdcs_2 photoshopeps photoshoppdf pictfileformat pictresourceformat pixar png portablebitmap raw scitexct sgirgb softimage targa tiff wavefrontrla wirelessbitmap
The file format to use (default: compuservegif).
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 57
Property Value type What it is (Continued)
includeProfile
interlaced
lossy
matteColor
optimized
PNG8
quality
transparency
boolean
boolean
integer
RGB color
boolean
boolean
integer
boolean
Indication of whether to include the document’s embedded color profile (default:
false).
Indication of whether to download in multiple passes; progressive (default:
false).
The amount of lossiness allowed (default: 0).
The colors to blend transparent pixels against.
Indication of whether to create smaller but less compatible files (default:
Note: Valid only when
format.
See
true).
format:JPEG.
Indicates the number of bits; true = 8, false = 24 (default:
Note: Valid only when
true).
See
format:PNG.
format.
The quality of the produced image (0 - 100 as percentage; default:
60).
Indication of transparent areas of the image should be included in the saved image (default:
true).
transparencyAmount
transparencyDither
typename
webSnap
integer
Valid values:
diffusion noise none pattern
string
integer
The amount of transparency dither (default: 100).
Note: Valid only if
transparency.
transparency: true. See
The transparency dither algorithm (default:
).
none
Read-only. The class name of the referenced
ExportOptionsSaveForWeb object.
The tolerance amount within which to snap close colors to web palette colors (default:
0).
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 58

filter options

Options used with the filter command.
The following classes inherit properties from the
clouds, custom filter, deinterlace, despeckle, difference clouds, diffuse glow, displace filter, dust and scratches, Gaussian blur, glass filter, high pass, high pass, lens blur, maximum filter, median noise, minimum filter, motion blur, notifier, notifiers, ocean ripple, offset filter, pinch, polar coordinates, radial blur, ripple, sharpen, sharpen edges, sharpen more, shear, smart blur, spherize, texture fill, twirl, unsharp mask, wave filter, zigzag.
Valid Commands
filter
filter options class: add noise, blur, blur more,
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 59

font, fonts

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

Property Value Type What 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)
end tell
Valid commands:
count exists index
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 60

gallery banner options

Options that can be specified for a Web photo gallery banner.
This class a property of the when creating a Web photo gallery.
create photo gallery command. It is not possible to get or create a Gallery banner options
the object.
See the

Properties

Property Value Type What it is
create photo gallery command for additional details.
gallery options object and is used to define a record that specifies options
Gallery banner options can only be supplied in conjunction with
contact info
date
font
font size
photographer
site name
Unicode text
Unicode text
Valid values:
Arial Courier New Helvetica Times New Roman
integer
Unicode text
Unicode text
Web photo gallery contact info.
Web photo gallery date (default: current date).
The font setting for the banner text (default: Arial).
The font size for the banner text (1 - 7; default: 3).
Web photo gallery photographer.
Web photo gallery site name (default: Adobe Web
Photo Gallery
).
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 61

gallery color options

Color options that can be specified for a Web photo gallery.
This class a property of the when creating a Web photo gallery.
create photo gallery command. It is not possible to get or create a Gallery color options
the object.
See the

Properties

Property Value Type What it is
create photo gallery command for additional details.
gallery options object and is used to define a record that specifies options
Gallery color options can only be supplied in conjunction with
active link color
background color
banner color
link color
text color
visited link color
RGB color
RGB color
RGB color
RGB color
RGB color
RGB color
The color used to indicate an active link.
The background color.
The banner color.
The color used to indicate a link.
The text color.
The color used to indicate a visited link.
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 62

gallery images options

Options for the larger images (not thumbnails) in a Web photo gallery.
This class a property of the when creating a Web photo gallery.
create photo gallery command. It is not possible to get or create a Gallery images options
the object.
See the
create photo gallery command for additional details.
gallery options object and is used to define a record that specifies options
Gallery images options can only be supplied in conjunction with
Note: See

Properties

Property Value Type What it is
border
caption
dimension
font
font size
image quality
gallery thumbnail options for information on specifying thumbnail image options.
integer
boolean
integer
Valid values:
Arial Courier New Helvetica Times New Roman
integer
integer
The width (in pixels) of the border between images (0 - 99; default:
0).
Indication of whether to generate image captions (default:
false).
The dimensions (in pixels) of a resized image (default:
350).
The font to use for captions (default: Arial).
The font size to use for captions (1 - 7; default: 3).
The quality setting for JPEG images (0 - 12; default:
5).
include copyright
include credits
include file name
include title
numeric links
resize constraint
resize images
boolean
boolean
boolean
boolean
boolean
Valid values:
constrain both constrain height constrain width
boolean
Indication of whether to include copyright information in captions (default:
false).
Indication of whether to include credits information in captions (default:
false).
Indication of whether to include the file name in captions (default:
false).
Indication of whether to include the title in captions (default:
false).
Indication of whether to add numeric links (default:
true).
Indication of whether and how the image should be constrained (default:
constrain both).
Indication of whether to automatically resize images for placement on the gallery pages (default:
true).
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 63

gallery options

Options for the create photo gallery command.

Properties

Property Value Type What it is
banner options
custom color options
email address
images options
layout style
preserve all metadata
security options
short extension
size attributes
sub folders
gallery banner options
gallery color options
Unicode text
gallery images options
Unicode text
boolean
gallery security options
boolean
boolean
boolean
Options related to banner settings.
Options related to custom color settings.
The email address to show on the web page.
Options related to images settings.
The style to use for laying out the web page (default:
Centered Frame 1 - Basic).
Indication of whether to save the metadata in JPEG files (default:
false).
Options related to security settings.
Indication of whether to use the short (.htm), as opposed to the long (.html) web page file name extension (default:
true).
Indication of whether to add width and height attributes for images (default:
true).
Indication of whether to include files found in the in sub folders of the input folder (default:
true).
thumbnail options
UTF8 encoding
gallery thumbnail options
boolean
Options related to thumbnail settings.
Indication of whether the web page should use UTF-8 encoding (default:
The following script creates a Web photo gallery.
tell application "Adobe Photoshop CS2"
create photo gallery with options: {from file:"HardDisk:Adobe Photoshop
CS2:WbGalleries", ¬
to file:"HardDisk:Adobe Photoshop CS2:NewWbGalleries", ¬ email address:"photoGallery@mygallery.com,"¬
class:gallery banner options {photographer:"Tom O’Rourke", ¬
contact info:"torourke@torourke.com", ¬ font:times new roman, sitename:"www.torourke.com"}¬
class: gallery color options: {active link color:blue,¬
background color:white, banner color: teal, link color: RED, text color:black, visited link color:purple}¬
class: gallery security options { content: gallery custom text, custom text:
copyright 2004 TOR¬
false).
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 64
font:courier new, text position: gallery centered; text rotate: counter
clockwise 45}}
end tell
Valid Commands
create photo gallery
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 65

gallery security options

Options for security text in a Web photo gallery.
This class a property of the when creating a Web photo gallery. with the
options
See the

Properties

Property Value Type What it is
create photo gallery command. It is not possible to get or create an Gallery security
object.
create photo gallery command for additional details.
gallery options object and is used to define a record that specifies options
Gallery security options can only be supplied in conjunction
content
custom text
font
font size
opacity
text color
Valid values:
gallery caption gallery copyright gallery credit gallery custom text gallery filename gallery none gallery title
Unicode text
Arial Courier New Helvetica Times New Roman
integer
integer
RGB color
The content to use for Web photo gallery security text (default:
gallery none).
Custom text to use for Web photo gallery security text.
Note: Valid only when
text
. See content.
content: custom
The font to use for Web photo gallery security text (default:
Arial).
The font size to use for Web photo gallery security text (minimum 1; default:
36).
The opacity (as percent) to use for web page security text (default:
100).
The web page security text color.
text position
text rotate
Valid values:
gallery centered gallery lower left gallery lower right gallery upper left gallery upper right
Valid values:
clock wise 45 clock wise 90 counter clock wise 45 counter clock wise 90 zero
The position of web page security text (default:
gallery centered).
The orientation to use for web page security text (default:
zero).
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 66

gallery thumbnail options

Options for the thumbnail images in a Web photo gallery.
This class a property of the when creating a Web photo gallery. with the
options
See the

Properties

Property Value Type What it is
create photo gallery command. It is not possible to get or create an Gallery thumbnail
object.
create photo gallery command for additional details.
gallery options object and is used to define a record that specifies options
Gallery thumbnail options can only be supplied in conjunction
border
caption
column count
dimension
font
font size
include copyright
include credits
include file name
integer
boolean
integer
integer
Valid values:
Arial Courier New Helvetica Times New Roman
integer
boolean
boolean
boolean
The width (in pixels) of the border around thumbnail images (0 - 99; default:
0).
Indication of whether to display captions (default:
false).
The number of columns on the page (default: 5).
Thumbnail dimensions in pixels (default: 75).
The font to use (default: Arial).
The font size for thumbnail images text (1 - 7; default:
3).
Indication of whether to include copyright information for thumbnails (default:
false).
Indication of whether to include credits for thumbnails (default:
false).
Indication of whether to include file names for thumbnails (default:
false).
include title
row count integer
size
boolean
integer
Valid values:
gallery custom gallery large gallery medium gallery small
Indication of whether to include titles for thumbnails (default:
false).
The number of rows on the page (default: 3).
The thumbnail image size (default: gallery
medium
).
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 67

Gaussian blur

Options that may be supplied when applying a Gaussian Blur filter.
Gaussian blur class supplies properties for the filter options class. The Gaussian blur class is
The used only to define a record whose properties specify options when applying a Gaussian Blur filter.
Gaussian blur options can be supplied only in conjunction with the filter command. It is not possible
to get or create a
See the filter command for additional details.

Properties

Property Value Type What it is
Gaussian blur object.
radius
real
The radius in pixels in which to apply the filter.
The following code sample demonstrates how to apply the Gaussian Blur filter using the filter command of the
... filter current layer of the current document using Gaussian blur filter ¬
with options {class:Gaussian blur, radius:200}
Gaussian blur class (inherited from the filter options super class).
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 68

GIF save options

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

Property Value Type What 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 options class.
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:
Note: When
white matte).
transparency: false, the
matte color is applied to transparent areas. See
transparency.
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 69
Property Value Type What it is (Continued)
palette
preserve exact colors
Valid values:
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 ¬
myOptions appending no extension without copying
end tell
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 70

glass filter

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

Property Value Type What 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 ¬
with options {class:glass, distortion:20, smoothness:100¬ scaling:155, texture kind:tiny lens, texture definition:"Hard Disk:Photoshop
CS2:Textures:Texture1"}
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 71

gray color

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.

Properties

Property Value Type What it is
gray value
real
The gray value (0.0 - 100.0; default: 0.0).
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 72

high pass

Options that may be supplied when applying a High Pass filter.
high pass class supplies properties for the filter options class. The high pass class is used only
The to define a record whose properties specify options when applying a High Pass filter. can be supplied only in conjunction with the
pass
See the filter command for additional details.

Properties

Property Value Type What it is
filter command. It is not possible to get or create a high
object.
high pass options
radius
real
(0.1 - 250.0) in pixels.
The following code sample demonstrates how to apply the High Pass filter using the filter command of
high pass class (inherited from the filter options super class).
the
... filter current layer of the current document using high pass filter ¬
with options {class:high pass, radius:25.5}
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 73

history state, history states

A history state for the document.

Properties

Property Value Type What it is
best type
class type
default type
index
properties
container
name
snapshot
Valid Commands
count exists index
type class
class
type class
integer
record
reference
Unicode text
boolean
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.
Read-only. The object’s container.
The history state’s name.
Read-only. Indication of whether to the history state is a snapshot.
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 74

HSB color

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.

Properties

Property Value Type What it is
hue
saturation
brightness
real
real
real
The hue value (0.0 - 100.0; default: 0.0).
The saturation value (0.0 - 100.0; default: 0.0).
The brightness value (0.0 - 100.0; default: 0.0).
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 75

Illustrator paths export options

Options that can be specified when exporting a path item to an Adobe Illustrator® file. See ‘path item,
path items’ on page 104.

Properties

Property Value Type What it is
path name
target path
Unicode text
Valid values:
all paths document bounds named path
The name of path to export.
Note: Valid only when
target path: named path.
The sort of path(s) to export (default: document
bounds
).
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 76

indexed mode options

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

Property Value Type What 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:
Note: When
matte white).
transparency: false, the
matte color is applied to transparent areas. See
transparency.
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 77
Property Value Type What it is (Continued)
palette
preserve exact colors
transparency
Valid values:
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.
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 78

info-object

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

Property Value Type What 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.
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 79
Property Value Type What it is (Continued)
province or state
source
supplemental categories
title
transmission reference
urgency
Unicode text
Unicode text
list of Unicode text
Unicode text
Unicode text
Valid values:
four high low none normal seven six three two
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 80

inversion

The inversion class supplies options for the adjustment options class to invert the colors in an image.
The
inversion class, which is analogous to the Invert 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 Invert adjustment to an image. The inversion 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 inversion object.
The following code sample demonstrates how to apply a Inversion adjustment using the command of the
... adjust current layer of the current document using inversion adjustment¬
with options {class:inversion}
inversion class (inherited from the adjustment options super class).
adjust
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 81

JPEG save options

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

Property Value Type What 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 options class.
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 ¬
myOptions appending no extension without copying
end tell
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 82

Lab color

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.
See the

Properties

Property Value Type What it is
convert color command for additional details.
value_L
value_a
value_b
real
real
real
The L value (0.0 - 100.0).
The a value (-128.0 - 127.0).
The b value (-128.0 - 127.0).
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 83

layer, layers

A layer object. The following classes inherit properties from the layer class: art layer, art layers,
layer set, layer sets.

Properties

Property Value Type What 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).
Indication of whether the layer is visible.
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 84
Valid Commands
delete index link make rotate scale translate unlink
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 85

layer comp, layer comps

A "snapshot" of a temporary composition of the layers in a document.

Properties

Property Value Type What it is
best type
class type
default type
index
properties
appearance
comment
container
name
position
selected
visibility
Valid Commands
apply delete index make recapture reset from comp
type class
class
type class
integer
record
boolean
anything
reference
Unicode text
boolean
boolean
boolean
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.
Indication of whether to use layer appearance (layer styles) settings.
Read-only. A description of the layer comp.
Read-only. The object’s container.
The layer’s name.
Indication of whether to use layer position.
Indication of whether the layer comp is selected.
Indication of whether to use layer visibility settings.
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 86

layer set, layer sets

A layer set.

Elements

Element Refer to by
art layer
layer
layer set

Properties

Property Value Type What it is
best type
class type
default type
index
name, numeric index, as a range of elements, before
after another element, satisfying a test.
name, numeric index, as a range of elements, before
after another element, satisfying a test.
name, numeric index, as a range of elements, before
after another element, satisfying a test.
type class
Read-only. (Inherited from the layer class) The best type for the object's value.
class
Read-only. (Inherited from the layer class) The object’s class.
type class
Read-only. (Inherited from the layer class) The default type for the object’s value.
integer
Read-only. (Inherited from the layer class) The index of this instance of the object.
properties
all locked
record
boolean
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) Indicates whether the contents in the layers contained in the layer set are editable.
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 87
Property Value Type What it is
blend mode
bounds
container
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
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.
Channels that are enabled for the layer set.
Note: Must be a list of component channels.
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 88
unlink
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 89

lens blur

Options that can be specified when applying a Lens Blur filter.
lens blur class supplies properties for the filter options class. The lens blur class is used only
The to define a record whose properties specify options when applying a Lens Blur filter. can be supplied only in conjunction with the
blur
See the filter command for additional details.

Properties

Property Value type What it is
filter command. It is not possible to get or create a lens
object.
lens blur options
amount
blade curvature
brightness
distribution
focal distance
invert depth map
monochromatic
radius
rotation
shape
number (long)
number (long)
number (long)
Valid values:
gaussian uniform
number (long)
boolean
boolean
number (long)
number (long)
Valid values:
heptagon hexagon octagon pentagon square triangle
The amount of noise (default: 0).
The blade curvature of the iris (default: 0).
The brightness for the specular highlights (default:
0).
The distribution value for the noise (default:
uniform).
The blur focal distance for the depth map (default:
0).
Indicates whether the depth map is inverted (default:
false).
Indicates whether the noise is monochromatic (default:
false).
The radius of the iris (default: 15).
The rotation of the iris (default: 0).
The shape of the iris (default: hexagon).
source
threshold
Valid values:
image highlight layer mask none transparency channel
number (long)
The source for the depth map (default: none).
The threshold for the specular highlights (default:
0).
The following code sample demonstrates how to apply the Lens Blur filter using the filter command of
Lens blur class (inherited from the filter options super class).
the
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 90
... filter current layer of the current document using lens blur filter ¬
with options {class:lens blur, radius:13}
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 91

lens flare

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

Property Value Type What 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}
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 92

levels adjustment

The levels adjustment class supplies options for the adjustment options class to correct the tonal range and color balance of an image.
levels adjustment class, which is analogous to the Levels command in the Adobe Photoshop CS2
The application, is used only to define a record containing properties that specify options when applying a Levels adjustment to an image. The
adjust command. It is not possible to get or create a levels adjustment object.
See the

Properties

Property Value Type What it is
adjust command for additional details.
levels adjustment class can be used only in conjunction with the
input range start
input range end
input range gamma
output range start
output range end
integer
integer
real
integer
integer
(
0 - 253)
((inputRangeStart + 2) - 255)
(0.10 - 9.99)
(0 - 253)
((outputRangeStart + 2) - 255)
The following code sample demonstrates how to apply a Levels Adjustment using the adjust command
levels adjustment class (inherited from the adjustment options super class).
of the
... adjust current layer of the current document using levels adjustment¬
with options {class:levels adjustment, input range start:4,¬ input range end:245, input range gamma:4.8, output range start:5, ¬ output range end: 7}
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 93

maximum filter

Options that may be supplied when applying a Maximum filter.
maximum filter class supplies properties for the filter options class. The maximum filter class
The is used only to define a record whose properties specify options when applying a Maximum filter.
filter
create a
See the filter command for additional details.

Properties

Property Value Type What it is
options can be supplied only in conjunction with the filter command. It is not possible to get or
maximum filter object.
maximum
radius
real
(1 - 100) in pixels.
The following code sample demonstrates how to apply the Maximum filter using the filter command of
maximum filter class (inherited from the filter options super class).
the
... filter current layer of the current document using maximum filter ¬
with options {class:maximum filter, radius:29}
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 94

median noise

Options that may be supplied when applying a Median Noise filter.
median noise class supplies properties for the filter options class. The median noise class is
The used only to define a record whose properties specify options when applying a Median Noise filter.
noise
create a
See the filter command for additional details.

Properties

Property Value Type What it is
options can be supplied only in conjunction with the filter command. It is not possible to get or
median noise object.
median
radius
real
(1 - 100) in pixels.
The following code sample demonstrates how to apply the Median Noise filter using the filter command of the
... filter current layer of the current document using median noise filter ¬
with options {class:median noise, radius:22}
median noise class (inherited from the filter options super class).
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 95

minimum filter

Options that may be supplied when applying a Minimum filter.
minimum filter class supplies properties for the filter options class. The minimum filter class
The is used only to define a record whose properties specify options when applying a Minimum filter.
filter
create a
See the filter command for additional details.

Properties

Property Value Type What it is
options can be supplied only in conjunction with the filter command. It is not possible to get or
minimum filter object.
minimum
radius
real
(1 - 100) in pixels.
The following code sample demonstrates how to apply the Minimum filter using the filter command of
minimum filter class (inherited from the filter options super class).
the
... filter current layer of the current document using minimum filter ¬
with options {class:minimum filter, radius:29}
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 96

mix channels

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

Property Value Type What 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},
green:{0, 172, 136, 0}, blue: {-66, 0, 100, -112}}}
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 97

motion blur

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

Property Value Type What 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}
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 98

no color

An object that represents a missing color. The no color class inherits properties from the color value class.
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 99

notifier, notifiers

An event-handler object that tells the script to execute specified code when a specified event occurs.
Note: You can remove a

Properties

Property Value type What it is
event
event class
event file
typename
Valid commands:
delete exists index make
notifier object from the Script Events Manager drop-down list by deleting the
file named
Script Events Manager.xml from in the Photoshop preferences folder. See Adobe
Photoshop CS2 help for more information.
string
Read-only. The event ID in four characters or a unique string that the notifier is associated with.
string
file
Read-only. The class ID of the event.
Read-only. The path to the file to execute when the event occurs/activates the notifier.
string
Read-only. The class name of the referenced notifier object.
Adobe Photoshop CS2
AppleScript Scripting Reference AppleScript Objects 100

NTSC colors

Options that may be supplied when applying the NTSC colors filter.
NTSC colors class supplies properties for the filter options class. The NTSC colors class is used
The only to define a record whose properties specify options when using the NTSC colors filter. is not possible to get or create a
NTSC colors options can be supplied only in conjunction with the filter command. It
NTSC colors object.
See the filter command for additional details.
filter command to apply an
The following code sample demonstrates how to apply the NTSC colors filter using the of the
motion blur class (inherited from the filter options super class).
... filter current layer of the current document using NTSC colors filter ¬
with options {class:NTSC colors}
filter command
Loading...