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.
®
, the Adobe logo, Acrobat®, Illustrator®, and Photoshop® are either registered trademarks or trademarks of Adobe Systems
Adobe
Incorporated in the United States and/or other countries.
Apple®, Mac OS®, 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. JavaScriptTM 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.
art layer, art layers ........................................................................................................................................................................15
BMP save options .........................................................................................................................................................................26
brightness and contrast.............................................................................................................................................................28
Camera RAW open options.......................................................................................................................................................29
color balance..................................................................................................................................................................................36
color sampler, color samplers..................................................................................................................................................37
color value.......................................................................................................................................................................................38
DICOM open options ..................................................................................................................................................................47
dust and scratches .......................................................................................................................................................................55
EPS open options .........................................................................................................................................................................56
EPS save options...........................................................................................................................................................................57
gallery color options ...................................................................................................................................................................64
GIF save options............................................................................................................................................................................71
high pass..........................................................................................................................................................................................75
history state, history states .......................................................................................................................................................76
HSB color .........................................................................................................................................................................................77
JPEG save options ........................................................................................................................................................................84
Lab color ..........................................................................................................................................................................................85
maximum filter..............................................................................................................................................................................96
median noise..................................................................................................................................................................................98
no color ......................................................................................................................................................................................... 102
open options............................................................................................................................................................................... 107
path point, path points ........................................................................................................................................................... 110
path point info............................................................................................................................................................................ 111
PDF open options...................................................................................................................................................................... 112
PDF save options ....................................................................................................................................................................... 114
Photo CD open options........................................................................................................................................................... 117
Photoshop DCS 1.0 save options......................................................................................................................................... 119
Photoshop DCS 2.0 save options......................................................................................................................................... 121
Photoshop save options ......................................................................................................................................................... 123
PICT file save options ............................................................................................................................................................... 124
PICT resource save options.................................................................................................................................................... 125
PNG save options ...................................................................................................................................................................... 130
raw format open options........................................................................................................................................................ 136
raw save options........................................................................................................................................................................ 137
RGB color ...................................................................................................................................................................................... 138
save for web export options.................................................................................................................................................. 141
save options ................................................................................................................................................................................ 143
sub path info............................................................................................................................................................................... 157
sub path item, sub path items.............................................................................................................................................. 158
Targa save options.................................................................................................................................................................... 159
texture fill ..................................................................................................................................................................................... 168
TIFF save options....................................................................................................................................................................... 170
auto count.................................................................................................................................................................................... 182
close ............................................................................................................................................................................................... 185
convert to shape........................................................................................................................................................................ 188
create PDF presentation ......................................................................................................................................................... 191
create work path........................................................................................................................................................................ 193
do action....................................................................................................................................................................................... 199
do javascript................................................................................................................................................................................ 200
fill path .......................................................................................................................................................................................... 210
index .............................................................................................................................................................................................. 217
link .................................................................................................................................................................................................. 219
make clipping path................................................................................................................................................................... 222
make work path ......................................................................................................................................................................... 222
open ............................................................................................................................................................................................... 225
Photoshop open dialog .......................................................................................................................................................... 227
record measurements.............................................................................................................................................................. 233
reset from comp ........................................................................................................................................................................ 235
select all ........................................................................................................................................................................................ 245
similar ............................................................................................................................................................................................ 246
trim ................................................................................................................................................................................................. 255
web safe color............................................................................................................................................................................. 257
Appendix A: Event ID Codes ................................................................................................... 258
Index .........................................................................................................................................266
1
Introduction
This reference describes the objects and commands in the Adobe® Photoshop® CS5 AppleScript
dictionary. A companion document, Adobe Photoshop CS5, 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 CS5, and lists changes to the
AppleScript interface since the previous release.
● AppleScript Objects, which provides a complete reference for all AppleScript Photoshop DOM objects.
● AppleScript Commands, which provides a complete refernce for all AppleScript Photoshop DOM
commands.
Changes Since Earlier Versions—CS5 Changes
The following changes have been made to the AppleScript object model and language support in Adobe
Photoshop CS5.
We have made major changes around printing a document. After making such sweeping changes, your
printing scripts may not work in CS5. The new printing interface makes maintaining backwards
compatibility an issue and scripts will need to be updated for the new printing interface. See the print
command.
Two new blend modes:
Two new color blend modes: subtract and divide
subtract and divide
8
2
Elements
AppleScript Objects
The objects of the AppleScript dictionary for Adobe Photoshop CS5 are presented alphabetically and in
tabular format in this chapter. Where appropriate, the object class has two tables:
● Element — Lists the classes that inherit from the current class, as well as the methods by which the
classes can be referred.
● Property — The properties you can use with the object, as well as each property’s value type, input
status, and description.
The commands that can be used with an object are listed below the object’s Properties table.
Sample code for several object classes is given to help illustrate the syntax as well as usage of the object
class.
The following sample tables and command list illustrate the format for this chapter.
ElementRefer to by
channel
Properties
PropertyValue TypeWhat it is
bits per channel
component channels
current channels
current layer
info
Valid Commands
change mode
close
convert
count
name, numeric index, as a range of elements, before
after another element, satisfying a test
Valid values:
eight
one
sixteen
list of channels
list of channel
layer
info-object
The number of bits per channel.
Read-only. A list of the component color channels.
Options that may be supplied when applying an Add Noise filter.
The
add noise class supplies properties for the filter options class. The add noise class is used only
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
add noise
See the
Properties
PropertyValue TypeWhat it is
amount
distribution
monochromatic
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).
tell application "Adobe Photoshop CS5"
end tell
filter command for additional details.
real
(amount: 0.1% - 400%)
Valid values:
Gaussian
uniform
boolean
filter current layer of the current document using add noise ¬
with options {class:add noise, amount:2.5, distribution:uniform, ¬
monochromatic:false}
TIndicates whether all notifiers are enabled or
disabled..
Read-only. The full path to the Preferences folder.
Read-only. Files in the Recent Files list.
Read-only. The build date of the scripting interface .
Read-only. The scripting interface version.
Read-only. The application preference settings
(equivalent to selecting Edit > Preferences in the
®
Adobe Photoshop CS5 application in Windows
®
Photoshop > Preferences in Mac OS
).
or
Read-only. Runtime details of the application and
system.
Read-only. A list of file image types Adobe
Photoshop CS5 can open.
Read-only. The Adobe Photoshop version.
The the first line of the following code sample directs Adobe Photoshop CS5 to carry out the script’s
commands. The second line uses the
activate command to make Adobe Photoshop CS5 the frontmost
application.
tell application "Adobe Photoshop CS5"
activate
set fgColor to foreground color
set bgColor to background color
set foreground color to {class:RGB color, red:255, green:128, blue:128}
set background color to {class:RGB color, red:0, green:50, blue:255}
delay 1
set foreground color to fgColor
set background color to bgColor
tell me to activate
my dd("name:" & name)
my dd("locale:" & locale)
my dd("scripting version:" & scripting version)
my dd("scripting build date:" & scripting build date)
my dd("macintosh file types:" & macintosh file types)
my dd("windows file types:" & windows file types)
Any layer that can contain data. The art layer class inherits properties from the layer, layers class.
Properties
PropertyValue TypeWhat it is
best type
class
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
darker color
difference
dissolve
divide
exclusion
hard light
hard mix
hue blend
lighten
lighter color
linear burn
linear dodge
linear light
luminosity
multiply
normal
overlay
pass through
pin light
saturation blend
screen
soft light
subtract
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.
(Inherited from the layer class) All of this
object’s properties returned in a single record.
(Inherited from the layer class) Indicates
whether all of the layer’s contents are locked
or editable.
(Inherited from the layer class) The mode
used when compositing an object.
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 CS5 application, is used only to define a record containing properties that specify options
when using the
contrast
create an
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.
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).
tell application "Adobe Photoshop CS5"
adjust current layer of the current document using automatic contrast
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
CS5 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.
adjust command. It is not possible to get or create an automatic
See the
adjust command for additional details.
The following code sample demonstrates how to apply an Automatic Levels adjustment using the
command of the
tell application "Adobe Photoshop CS5"
adjust current layer of the current document using automatic levels
end tell
automatic levels class (inherited from the adjustment options super class).
Options to specify when running a Batch command. See batch.
Properties
PropertyValue typeWhat it is
destination
destination folder
error file
file naming
Valid values:
folder
no destination
save and close
alias
alias
Valid values:
ddmm
ddmmyy
document name lower
document name mixed
document name upper
extension lower
extension upper
mmdd
mmddyy
serial letter lower
serial letter upper
serial number one
serial number two
serial number three
serial number four
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.
macintosh compatible
override open
boolean
boolean
Indicates whether to make the final file nameS
Macintosh compatible (default:
Note: Valid only when
destination.
See
destination:folder.
true).
Indicates whether to override action open
commands (default:
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 that specify options when changing a
document’s mode.
command. It is not possible to get or create a
command for more details.
Properties
PropertiesValue TypeWhat it is
bitmap mode class inherits properties from the change mode optionsclass.
Bitmap mode options can only be supplied in conjunction with the change mode
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
.
For information about pre-installed valid
patterns, see Adobe Photoshop CS5 Help
on the bitmap conversion command, or
view the options availabe in the Custom
Color drop down box after choosing the
bitmap conversion command.
Options that may be supplied when applying a Blur filter.
The
blur class supplies properties for the filter options class. The blur class is used only to define a
record when using the
conjunction with the
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.
See the
filter command for additional details.
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).
tell application "Adobe Photoshop CS5"
filter current layer of the current document using blur
The blur more class supplies properties for the filter options class when using the filter command
apply a Blur More filter. The
command to apply a Blur More filter. The
filter command. It is not possible to get or create a blur more object.
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
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).
tell application "Adobe Photoshop CS5"
filter current layer of the current document using blur more
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.
tell application "Adobe Photoshop CS5"
make new document
set myFile to "Data:docsamples:testfiles:BmpTest.bmp"
set myOptions to {class:BMP save options, bits per sample:sixteen, ¬
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 CS5 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.
brightness and contrast
See the
Properties
PropertyValue TypeWhat it is
brightness level
contrast level
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).
tell application "Adobe Photoshop CS5"
end tell
adjust command for additional details.
integer
integer
adjust current layer of the current document using brightness and contrast ¬
with options {class:brightness and contrast, brightness level:10, ¬
contrast level:10}
Options that can be specified when opening a document in Camera RAW format. The Camera RAW open
options
This class is used to define a record containing properties that specify options when opening a document
in raw format.
is not possible to get or create a
Properties
PropertyValue typeWhat it is
class inherits properties from the open options class.
Camera RAW open options can be supplied only in conjunction with the open command. It
Camera RAW open options object.
bits per channel
blue hue
blue saturation
brightness
chromatic aberration by
chromatic aberration rc
color noise reduction
color space
contrast
Valid values:
eight
one
sixteen
thirty two
integer
integer
integer
integer
integer
integer
Valid values:
Adobe RGB
color match RGB
ProPhoto Rgb
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
green hue
green saturation
luminance smoothing
red hue
red saturation
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).
A channel in a document. A channel can be either a component channel representing a color of the
document color model or an alpha channel. You can use alpha channels to store masked areas, selected
areas or spot colors.
Properties
PropertyValue TypeWhat it is
best type
class
default type
index
properties
channel color
container
histogram
type class
type class
type class
integer
record
color value
reference
list of integers
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.
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 52.
kind
name
opacity
visible
Valid Commands
count
delete
duplicate
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).
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
creating a color value.
Note: If the
Properties
PropertyValue TypeWhat it is
cyan
magenta
yellow
black
For an example of how to create and use color values, see color value and RGB color.
color value object and is used to define a record that specifies options when
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 CS5 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
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 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
CS5 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.
color balance class can be used only in conjunction with the
See the
Properties
PropertyValue TypeWhat it is
shadows
midtones
highlights
preserve luminosity
adjust command for additional details.
list of integers
list of integers
list of integers
boolean
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.
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.
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.
Indicates 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.
tell application "Adobe Photoshop CS5"
adjust current layer of the current document using color balance ¬
with options {class:color balance, shadows:{45, 4, 5}, ¬
preserve luminosity:false}
The curves class supplies options for the adjustment options class to adjust the tonal range of an
image. You can also use the curves object to make precise adjustments to individual color channels within
an image.
curves class, which is analogous to the Curves command in the Adobe Photoshop CS5 application, is
The
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
curves class can be used only in conjunction with the adjust command. It
curves object.
See the
Properties
PropertyValue TypeWhat it is
curve points
The following code sample demonstrates how to apply a Curves adjustment using the adjust command
of the
--curve points are in {input, output} pairs
--{0,0} & {255,255} are the initial points when you open curves dialog.
tell application "Adobe Photoshop CS5"
end tell
adjust command for additional details.
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 CS5 Help.
curves class (inherited from the adjustment options super class).
adjust current layer of the current document using curves ¬
Options that may be supplied when applying a De-Interlace filter.
The
deinterlace class supplies properties for the filter options class. The deinterlace class is used
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.
deinterlace
See the
Properties
PropertyValue TypeWhat it is
eliminate
create new fields by
The following code sample demonstrates how to apply the De-Interlace filter using the filter command
of the
tell application "Adobe Photoshop CS5"
end tell
filter command for additional details.
Valid values:
even fields
odd fields
Valid values:
duplication
interpolation
deinterlace class (inherited from the filter options super class).
filter current layer of the current document using deinterlace ¬
with options {class:deinterlace, eliminate:odd fields, ¬
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.
desaturate class, which is analogous to the Desaturate command in the Adobe Photoshop CS5
The
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.
adjust command. It is not possible to get or create a desaturate
See the
adjust command for additional details.
The following code sample demonstrates how to apply a Desaturate adjustment using the
command of the
tell application "Adobe Photoshop CS5"
adjust current layer of the current document using desaturate ¬
end tell
desaturate class (inherited from the adjustment options super class).
Options that can be specified when saving a document in EPS format. See the save command for
additional details.The
This class is used to define a record containing properties used to specify options when saving a document
as an EPS file.
possible to get or create an
Properties
PropertyValue TypeWhat it is
EPS save options can only be supplied in conjunction with the save command. It is not
EPS save options class inherits properties from the save optionsclass.
EPS save options object.
embed color profile
encoding
halftone screen
image interpolation
PostScript color
management
preview type
boolean
Valid Values:
ASCII
binary
high quality JPEG
low quality JPEG
maximum quality JPEG
medium quality JPEG
boolean
boolean
boolean
Valid Values:
eight bit Mac OS
eight bit TIFF
JPEG Mac OS
monochrome Mac OS
monochrome TIFF
none
Indicates whether to embed the color profile in
the document.
The type of encoding to use (default: binary).
Indicates whether to include the halftone
screen (default:
false).
Indicates whether to use image interpolation
(default:
false).
Indicates whether to use Postscript color
management (default:
false).
The preview type (default: monochrome TIFF).
transfer function
transparent whites
vector data
boolean
boolean
boolean
Indicates whether to include the Transfer
functions to compensate for dot gain between
the image and film (default:
false).
Indicates whether to display white areas as
transparent.
The following code creates the myOptions variable to hold the EPS save options, then uses the save
command to save the document with the specified options.
tell application "Adobe Photoshop CS5"
make new document
set myFile to "Data:docsamples:testfiles:EPSSave.eps"
set myOptions to {class:EPS save options, embed color profile:true}
save current document in file myFile as Photoshop EPS with options ¬
The equalize class supplies options for the adjustment options class to convert a color image to
redistribute the brightness values of the pixels in an image so that they more evenly represent the entire
range of brightness levels.
equalize class, which is analogous to the Equalize command in the Adobe Photoshop CS5
The
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
adjust command. It is not possible to get or create an equalize object.
See the
adjust command for additional details.
The following code sample demonstrates how to apply a Equalize adjustment using the
equalize class (inherited from the adjustment options super class).
of the
tell application "Adobe Photoshop CS5"
adjust current layer of the current document using equalize ¬
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
information.
Properties
PropertyValue TypeWhat it is
application on page 12 for more
best type
class
default type
index
properties
type class
type class
type class
integer
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.
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.
Read-only. The text face name.
Read-only. The font's PostScript name.
Read-only. 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 CS5"
set fontsInstalled to name of fonts
log fontsInstalled
Options that can be specified when saving a document in GIF format. See the save command for
additional details.The
This class is used to define a record containing properties used to specify options when saving a document
as a GIF file.
possible to get or create a
Properties
PropertyValue TypeWhat it is
GIF save options can only be supplied in conjunction with the save command. It is not
GIF save options class inherits properties from the save optionsclass.
GIF 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
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).
(default:
Note: Valid only when
75)
See
dither: diffusion.
dither.
Forces the inclusion of specified colors.
interlaced
matte
boolean
Valid values:
background color matte
black matte
foreground color matte
Netscape gray
none
semi gray
white matte
Indicates whether to interlace rows (default:
false).
The color to use to fill antialiased edges
adjacent to transparent areas of the image.
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: local
selective
).
Indicates 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
Indicates 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 CS5"
make new document
set myFile to "Data:docsamples:testfiles:GifTest.gif"
set myOptions to ¬
{class:GIF save options, dither:diffusion, dither amount:46, ¬
preserve exact colors:true, matte:background color matte}
save current document in file myFile as CompuServe GIF with options ¬
Options that may be supplied when applying a Glass filter.
The
glass filter class supplies properties for the filter options class. The glass filter class is
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.
glass filter
See the
Properties
PropertyValue TypeWhat it is
distortion
smoothness
scaling
invert texture
texture kind
texture definition
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 command for additional details.
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.
Note: You cannot specify
texture defintion at the same time.
texture kind and
The file that contains the texture image.
tell application "Adobe Photoshop CS5"
filter current layer of the current document using glass filter ¬
with options {class:glass filter, distortion:20, ¬
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
creating color value.
Properties
PropertyValue TypeWhat it is
gray value
color value object and is used to define a record that specifies options when
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
creating color value.
Properties
PropertyValue TypeWhat it is
hue
saturation
brightness
color value object and is used to define a record that specifies options when
Options that can be specified when changing the document mode to Indexed using the change mode
command. The
This class is used to define a record containing properties used to specify options when changing a
document’s mode.
command. It is not possible to get or create a
command for more details.
Properties
PropertyValue TypeWhat it is
indexed mode class inherits properties from the change mode options class.
Indexed mode options can only be supplied in conjunction with the change mode
Indexed mode options object. See the change mode
colors in palette
dither
dither amount
forced colors
integer
Valid values:
diffusion
noise
none
pattern
integer
Valid values:
black and white
none
primaries
web
The number of colors in the Color palette.
Note: Valid only when
palette: local adaptive;
palette: local perceptual;
palette: local selective;
palette: Mac OS system;
palette: uniform;
palette: web; or
palette: Windows system.
palette.
See
The dither type to use.
The amount of dither to use (1 - 100).
Note: Valid only when
dither: diffusion.
The type of colors to force into the color
palette.
matte background
color
Valid values:
background color matte
black matte
foreground color matte
Netscape gray
none
semi gray
white matte
The color to use to fill antialiased edges
adjacent to transparent areas of the image
(default:
exact
local adaptive
local perceptual
local selective
Mac OS system
master adaptive
master perceptual
master selective
previous
uniform
web
Windows system
boolean
boolean
The type of palette to use (default: exact).
Indicates 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.
Indicates whether to preserve transparent
areas of the image during conversion to GIF
format.
Document metadata.This class is a property of the document object and is used to define a record
containing properties that specify application preferences. See
Properties
PropertyValue TypeWhat it is
document, documents on page 51.
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.
Read-only. The object’s class.
Read-only. The default type for the object's value.
All of this objects properties returned in a single
record.
Read-only. The object’s container.
The document’s copyrighted status.
country
creation date
credit
EXIF
headline
instructions
job name
keywords
owner url
Unicode text
Unicode text
Unicode text
list of lists:
list (list {tag,
tag data}}, ...
Unicode text
Unicode text
Unicode text
list of Unicode
text
Unicode text
Read-only. Camera data that includes camera
settings used when the image was taken. Sample list
values are: tag = “camera”; tag value = “Cannon”.
A list of keywords that can identify the document or
its contents.
Options that can be specified when saving a document in JPEG format. See the save command for
additional details.The
This class is used to define a record containing properties used to specify options when saving a document
as a JPEG file.
possible to get or create a
Properties
PropertyValue TypeWhat it is
JPEG save options can only be supplied in conjunction with the save command. It is not
JPEG save options class inherits properties from the save optionsclass.
JPEG save options object.
embed color
profile
format options
matte
quality
scans
boolean
Valid values:
optimized
progressive
standard
Valid values:
background color matte
black matte
foreground color matte
Netscape gray
none
semi gray
white matte
integer
integer
Indicates 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 80.
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 CS5"
make new document
set myFile to "Data:docsamples:testfiles:JpegSave.jpg"
set myOptions to ¬
{class:JPEG save options, embed color profile:true, ¬
format options:progressive, quality:12, scans:3}
save current document in file myFile as JPEG with options ¬
Options that can be specified for an Lab color: numeric values for the component colors. The Lab color
class inherits properties from the color value class.
This class a property of the
creating color value.
See the
Properties
PropertyValue TypeWhat it is
value_L
value_a
value_b
color value object and is used to define a record that specifies options when
A layer object. The following classes inherit properties from the layer class: art layer, art layers,
layer set, layer sets.
Properties
PropertyValue TypeWhat it is
best type
class
default type
index
properties
all locked
blend mode
type class
type class
type class
integer
record
boolean
Valid Values:
color blend
color burn
color dodge
darken
difference
dissolve
exclusion
hard light
hard mix
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.
All of this object’s properties returned in a single
record.
Indicates whether all of the layer’s contents are
locked or editable.
The mode to use when compositing an object.
bounds
container
linked layers
name
list
reference
list of layers
Unicode text
Read-only. A list of coordinates that describe the
corners of the bounding rectangle of the layer.
color blend
color burn
color dodge
darken
difference
dissolve
exclusion
hard light
hard mix
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
(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.
container
linked layers
name
opacity
visible
enabled channels
Valid Commands
count
delete
duplicate
exists
index
link
make
merge
move
rotate
reference
list of layers
Unicode text
real
boolean
list of channels
Read-only. (Inherited from the layer class) The
object’s container.
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) Indicates whether
the layer set is visible.
Options that may be supplied when applying a Lens Flare filter.
The
lens flare class supplies properties for the filter options class. The lens flare class is used
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.
lens flare
See the
Properties
PropertyValue TypeWhat it is
brightness
flare center
lens type
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
tell application "Adobe Photoshop CS5"
end tell
filter command for additional details.
integer
list
(10 - 300) as percent.
The x and y coordinates of the center of the flare
(unit value).
Valid values:
Movie Prime
Prime 105
Prime 35
zoom
filter current layer of the current document using lens flare ¬
with options {class:lens flare, brightness:209, ¬
flare center:{2 as inches, 4 as inches}, lens type:Prime 35}
The mix channels class supplies options for the adjustment options class to modify a targeted
(output) color channel using a mix of the existing color channels in the image.
mix channels class, which is analogous to the Channel Mixer command in the Adobe Photoshop CS5
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.
mix channels class can be used only in conjunction with the
See the
Note: Valid only for RGB or CMYK documents.
Properties
PropertyValue TypeWhat it is
output channels
monochrome mixing
adjust command for additional details.
list of anything
boolean
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
CMYK. See
document, documents class.
mode in the Properties table of the
Indicates 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.
tell application "Adobe Photoshop CS5"
adjust current layer of the current document using mix channels ¬