ADOBE PHOTOSHOP CC
JAVASCRIPT SCRIPTING REFERENCE
bbc
© 2019 Adobe. All rights reserved.
Adobe® Photoshop® CC JavaScript Scripting Reference for Windows
®
and Macintosh®.
NOTICE: All information contained herein is the property of Adobe Inc. 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 Inc. 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 Inc. Adobe Inc. 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®, GoLive®, InDesign®, Illustrator®, Photoshop® are either registered trademarks or trademarks of Adobe Inc.
Adobe
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 Inc. 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 Inc. Adobe Inc. assumes no responsibility or liability for any errors or inaccuracies that may appear in the
informational content contained in this guide.
Adobe Inc., 345 Park Avenue, San Jose, CA 95110-2704 USA, www.adobe.com
Contents
1 Introduction ...............................................................................................................................32
JavaScript support in Adobe Photoshop CC ......................................................................................................................32
Executing scripts ....................................................................................................................................................................33
Installing scripts ...............................................................................................................................................................33
Executing other scripts..................................................................................................................................................33
Startup scripts .........................................................................................................................................................................33
Object model usage and naming...........................................................................................................................................34
2 JavaScript Object Reference ..................................................................................................... 35
Object descriptions......................................................................................................................................................................35
Properties notation ...............................................................................................................................................................35
displayDialogs.................................................................................................................................................................35
Methods notation ..................................................................................................................................................................35
crop.....................................................................................................................................................................................36
ActionDescriptor ..........................................................................................................................................................................37
Properties..................................................................................................................................................................................37
count ..................................................................................................................................................................................37
typename .........................................................................................................................................................................37
Methods ....................................................................................................................................................................................37
clear ....................................................................................................................................................................................37
erase ...................................................................................................................................................................................37
fromStream......................................................................................................................................................................37
getBoolean.......................................................................................................................................................................37
getClass .............................................................................................................................................................................37
getData..............................................................................................................................................................................37
getDouble ........................................................................................................................................................................37
getEnumerationType ...................................................................................................................................................37
getEnumerationValue..................................................................................................................................................37
getInteger.........................................................................................................................................................................37
getKey................................................................................................................................................................................37
getLargeInteger .............................................................................................................................................................38
getList ................................................................................................................................................................................38
getObjectType................................................................................................................................................................38
getObjectValue...............................................................................................................................................................38
getPath..............................................................................................................................................................................38
getReference ...................................................................................................................................................................38
getString ...........................................................................................................................................................................38
getType .............................................................................................................................................................................38
getUnitDoubleType......................................................................................................................................................38
getUnitDoubleValue.....................................................................................................................................................38
hasKey................................................................................................................................................................................38
isEqual................................................................................................................................................................................38
putBoolean ......................................................................................................................................................................38
putClass.............................................................................................................................................................................38
putData .............................................................................................................................................................................38
putDouble ........................................................................................................................................................................38
3
Adobe Photoshop CC
JavaScript Scripting Reference 4
putEnumerated ..............................................................................................................................................................38
putInteger ........................................................................................................................................................................39
putLargeInteger.............................................................................................................................................................39
putList................................................................................................................................................................................39
putObject..........................................................................................................................................................................39
putPath..............................................................................................................................................................................39
putReference...................................................................................................................................................................39
putString...........................................................................................................................................................................39
putUnitDouble................................................................................................................................................................39
toStream ...........................................................................................................................................................................39
ActionList.........................................................................................................................................................................................40
Properties..................................................................................................................................................................................40
count ..................................................................................................................................................................................40
typename .........................................................................................................................................................................40
Methods ....................................................................................................................................................................................40
clear ....................................................................................................................................................................................40
getBoolean.......................................................................................................................................................................40
getClass .............................................................................................................................................................................40
getData..............................................................................................................................................................................40
getDouble ........................................................................................................................................................................40
getEnumerationType ...................................................................................................................................................40
getEnumerationValue..................................................................................................................................................40
getInteger.........................................................................................................................................................................40
getLargeInteger .............................................................................................................................................................41
getList ................................................................................................................................................................................41
getObjectType................................................................................................................................................................41
getObjectValue...............................................................................................................................................................41
getPath..............................................................................................................................................................................41
getReference ...................................................................................................................................................................41
getString ...........................................................................................................................................................................41
getType .............................................................................................................................................................................41
getUnitDoubleType......................................................................................................................................................41
getUnitDoubleValue.....................................................................................................................................................41
putBoolean ......................................................................................................................................................................41
putClass.............................................................................................................................................................................41
putData .............................................................................................................................................................................41
putDouble ........................................................................................................................................................................41
putEnumerated ..............................................................................................................................................................41
putInteger ........................................................................................................................................................................41
putLargeInteger.............................................................................................................................................................41
putList................................................................................................................................................................................41
putObject..........................................................................................................................................................................42
putPath..............................................................................................................................................................................42
putReference...................................................................................................................................................................42
putString...........................................................................................................................................................................42
putUnitDouble................................................................................................................................................................42
ActionReference ...........................................................................................................................................................................43
Properties..................................................................................................................................................................................43
typename .........................................................................................................................................................................43
Methods ....................................................................................................................................................................................43
getContainer ...................................................................................................................
................................................43
Adobe Photoshop CC
JavaScript Scripting Reference 5
getDesiredClass..............................................................................................................................................................43
getEnumeratedType.....................................................................................................................................................43
getEnumeratedValue ...................................................................................................................................................43
getForm.............................................................................................................................................................................43
getIdentifier.....................................................................................................................................................................43
getIndex............................................................................................................................................................................43
getName ...........................................................................................................................................................................43
getOffset ...........................................................................................................................................................................43
getProperty......................................................................................................................................................................43
putClass.............................................................................................................................................................................44
putEnumerated ..............................................................................................................................................................44
putIdentifier.....................................................................................................................................................................44
putIndex............................................................................................................................................................................44
putName...........................................................................................................................................................................44
putOffset...........................................................................................................................................................................44
putProperty......................................................................................................................................................................44
Application .....................................................................................................................................................................................45
Properties..................................................................................................................................................................................45
activeDocument.............................................................................................................................................................45
backgroundColor...........................................................................................................................................................45
build....................................................................................................................................................................................45
colorSettings ...................................................................................................................................................................45
currentTool ......................................................................................................................................................................45
displayDialogs.................................................................................................................................................................45
documents .......................................................................................................................................................................45
fonts....................................................................................................................................................................................45
foregroundColor............................................................................................................................................................45
freeMemory .....................................................................................................................................................................46
locale ..................................................................................................................................................................................46
macintoshFileTypes......................................................................................................................................................46
measurementLog ..........................................................................................................................................................46
name...................................................................................................................................................................................46
notifiers .............................................................................................................................................................................46
notifiersEnabled.............................................................................................................................................................46
path.....................................................................................................................................................................................46
playbackDisplayDialogs ..............................................................................................................................................46
playbackParameters .....................................................................................................................................................46
preferences ......................................................................................................................................................................46
preferencesFolder .........................................................................................................................................................46
recentFiles ........................................................................................................................................................................46
scriptingBuildDate ........................................................................................................................................................46
scriptingVersion .............................................................................................................................................................46
systemInformation........................................................................................................................................................46
typename .........................................................................................................................................................................46
version ...............................................................................................................................................................................47
windowsFileTypes.........................................................................................................................................................47
Methods ....................................................................................................................................................................................47
batch ..................................................................................................................................................................................47
beep....................................................................................................................................................................................47
bringToFront ...................................................................................................................................................................47
changeProgressText.............................................................................................................
........................................47
Adobe Photoshop CC
JavaScript Scripting Reference 6
charIDToTypeID..............................................................................................................................................................47
compareWithNumbers................................................................................................................................................47
doAction ...........................................................................................................................................................................48
doForcedProgress .........................................................................................................................................................48
doProgress .......................................................................................................................................................................48
doProgressSegmentTask ............................................................................................................................................48
doProgressSubTask.......................................................................................................................................................49
doProgressTask ..............................................................................................................................................................49
eraseCustomOptions....................................................................................................................................................49
executeAction.................................................................................................................................................................49
executeActionGet..........................................................................................................................................................49
featureEnabled ...............................................................................................................................................................49
getCustomOptions........................................................................................................................................................49
isQuicktimeAvailable....................................................................................................................................................49
load .....................................................................................................................................................................................49
makeContactSheet........................................................................................................................................................50
makePDFPresentation .................................................................................................................................................50
makePhotoGallery.........................................................................................................................................................50
makePhotomerge..........................................................................................................................................................50
makePicturePackage....................................................................................................................................................50
open ...................................................................................................................................................................................50
openDialog ......................................................................................................................................................................50
purge..................................................................................................................................................................................51
putCustomOptions .......................................................................................................................................................51
refresh................................................................................................................................................................................51
refreshFonts.....................................................................................................................................................................51
runMenuItem ..................................................................................................................................................................51
showColorPicker ............................................................................................................................................................51
stringIDToTypeID...........................................................................................................................................................51
togglePalettes.................................................................................................................................................................51
toolSupportsBrushes....................................................................................................................................................51
(tool) ...................................................................................................................................................................................51
toolSupportsBrushPresets..........................................................................................................................................51
(tool) ...................................................................................................................................................................................51
typeIDToCharID..............................................................................................................................................................51
typeIDToStringID...........................................................................................................................................................52
updateProgress ..............................................................................................................................................................52
ArtLayer............................................................................................................................................................................................55
Properties..................................................................................................................................................................................55
allLocked...........................................................................................................................................................................55
blendMode.......................................................................................................................................................................55
bounds...............................................................................................................................................................................55
boundsNoEffects ...........................................................................................................................................................55
fillOpacity..........................................................................................................................................................................55
filterMaskDensity...........................................................................................................................................................55
filterMaskFeather...........................................................................................................................................................55
grouped ............................................................................................................................................................................55
isBackgroundLayer........................................................................................................................................................55
kind .....................................................................................................................................................................................55
layerMaskDensity...........................................................................................................................................................56
layerMaskFeather ...............................................................................................................
...........................................56
Adobe Photoshop CC
JavaScript Scripting Reference 7
linkedLayers.....................................................................................................................................................................56
name...................................................................................................................................................................................56
opacity...............................................................................................................................................................................56
parent.................................................................................................................................................................................56
pixelsLocked....................................................................................................................................................................56
positionLocked...............................................................................................................................................................56
textItem.............................................................................................................................................................................56
transparentPixelsLocked.............................................................................................................................................56
typename .........................................................................................................................................................................56
vectorMaskDensity........................................................................................................................................................56
vectorMaskFeather .......................................................................................................................................................56
visible .................................................................................................................................................................................56
xmpMetadata..................................................................................................................................................................56
Methods ....................................................................................................................................................................................57
adjustBrightnessContrast ...........................................................................................................................................57
adjustColorBalance.......................................................................................................................................................57
adjustCurves....................................................................................................................................................................57
adjustLevels.....................................................................................................................................................................57
applyAddNoise...............................................................................................................................................................57
applyAverage..................................................................................................................................................................57
applyBlur...........................................................................................................................................................................57
applyBlurMore ................................................................................................................................................................57
applyClouds.....................................................................................................................................................................57
applyCustomFilter.........................................................................................................................................................57
applyDeInterlace............................................................................................................................................................58
applyDespeckle..............................................................................................................................................................58
applyDifferenceClouds................................................................................................................................................58
applyDiffuseGlow ..........................................................................................................................................................58
applyDisplace..................................................................................................................................................................58
applyDustAndScratches..............................................................................................................................................58
applyGaussianBlur.........................................................................................................................................................58
applyGlassEffect.............................................................................................................................................................58
applyHighPass ................................................................................................................................................................58
applyLensBlur .................................................................................................................................................................59
applyLensFlare................................................................................................................................................................59
applyMaximum ..............................................................................................................................................................59
applyMedianNoise ........................................................................................................................................................59
applyMinimum ...............................................................................................................................................................60
applyMotionBlur ............................................................................................................................................................60
applyNTSC........................................................................................................................................................................60
applyOceanRipple.........................................................................................................................................................60
applyOffset.......................................................................................................................................................................60
applyPinch .......................................................................................................................................................................60
applyPolarCoordinates................................................................................................................................................60
applyRadialBlur ..............................................................................................................................................................60
applyRipple......................................................................................................................................................................60
applySharpen..................................................................................................................................................................60
applySharpenEdges......................................................................................................................................................60
applySharpenMore .......................................................................................................................................................60
applyShear .......................................................................................................................................................................61
applySmartBlur...............................................................................................................................................................61
Adobe Photoshop CC
JavaScript Scripting Reference 8
applySpherize .................................................................................................................................................................61
applyStyle.........................................................................................................................................................................61
applyTextureFill..............................................................................................................................................................61
applyTwirl.........................................................................................................................................................................61
applyUnSharpMask.......................................................................................................................................................61
applyWave........................................................................................................................................................................61
applyZigZag.....................................................................................................................................................................61
autoContrast....................................................................................................................................................................61
autoLevels ........................................................................................................................................................................61
clear ....................................................................................................................................................................................62
copy ....................................................................................................................................................................................62
cut........................................................................................................................................................................................62
desaturate ........................................................................................................................................................................62
duplicate...........................................................................................................................................................................62
equalize.............................................................................................................................................................................62
invert ..................................................................................................................................................................................62
link.......................................................................................................................................................................................62
merge.................................................................................................................................................................................62
mixChannels....................................................................................................................................................................63
move...................................................................................................................................................................................63
photoFilter .......................................................................................................................................................................63
posterize ...........................................................................................................................................................................63
rasterize.............................................................................................................................................................................63
remove...............................................................................................................................................................................63
resize ..................................................................................................................................................................................64
rotate..................................................................................................................................................................................64
selectiveColor..................................................................................................................................................................64
shadowHighlight ...........................................................................................................................................................64
threshold...........................................................................................................................................................................64
translate ............................................................................................................................................................................64
unlink .................................................................................................................................................................................64
ArtLayers..........................................................................................................................................................................................67
Properties..................................................................................................................................................................................67
length.................................................................................................................................................................................67
parent.................................................................................................................................................................................67
typename .........................................................................................................................................................................67
Methods ....................................................................................................................................................................................67
add ......................................................................................................................................................................................67
getByName ......................................................................................................................................................................67
removeAll .........................................................................................................................................................................67
BatchOptions .................................................................................................................................................................................68
Properties..................................................................................................................................................................................68
destination .......................................................................................................................................................................68
destinationFolder ..........................................................................................................................................................68
errorFile.............................................................................................................................................................................68
fileNaming........................................................................................................................................................................68
macintoshCompatible .................................................................................................................................................68
overrideOpen..................................................................................................................................................................68
overrideSave....................................................................................................................................................................68
startingSerial ...................................................................................................................................................................68
suppressOpen...................................................................................................................
..............................................68
Adobe Photoshop CC
JavaScript Scripting Reference 9
suppressProfile ...............................................................................................................................................................69
typename .........................................................................................................................................................................69
unixCompatible..............................................................................................................................................................69
windowsCompatible ....................................................................................................................................................69
BitmapConversionOptions .......................................................................................................................................................70
Properties..................................................................................................................................................................................70
angle...................................................................................................................................................................................70
frequency..........................................................................................................................................................................70
method..............................................................................................................................................................................70
patternName...................................................................................................................................................................70
resolution..........................................................................................................................................................................70
shape..................................................................................................................................................................................70
typename .........................................................................................................................................................................70
BMPSaveOptions ..........................................................................................................................................................................71
Properties..................................................................................................................................................................................71
alphaChannels................................................................................................................................................................71
depth..................................................................................................................................................................................71
flipRowOrder...................................................................................................................................................................71
osType................................................................................................................................................................................71
rleCompression ..............................................................................................................................................................71
typename .........................................................................................................................................................................71
CameraRAWOpenOptions ........................................................................................................................................................72
Properties..................................................................................................................................................................................72
bitsPerChannel ...............................................................................................................................................................72
blueHue.............................................................................................................................................................................72
blueSaturation................................................................................................................................................................72
brightness.........................................................................................................................................................................72
chromaticAberrationBY...............................................................................................................................................72
chromaticAberrationRC...............................................................................................................................................72
colorNoiseReduction....................................................................................................................................................72
colorSpace........................................................................................................................................................................72
contrast .............................................................................................................................................................................72
exposure ...........................................................................................................................................................................72
greenHue..........................................................................................................................................................................72
greenSaturation .............................................................................................................................................................72
luminanceSmoothing ..................................................................................................................................................72
redHue...............................................................................................................................................................................72
redSaturation ..................................................................................................................................................................72
resolution..........................................................................................................................................................................72
saturation .........................................................................................................................................................................72
settings..............................................................................................................................................................................72
shadows ............................................................................................................................................................................72
shadowTint ......................................................................................................................................................................72
sharpness..........................................................................................................................................................................72
size ......................................................................................................................................................................................72
temperature.....................................................................................................................................................................72
tint.......................................................................................................................................................................................73
typename .........................................................................................................................................................................73
vignettingAmount ........................................................................................................................................................73
vignettingMidpoint ......................................................................................................................................................73
whiteBalance...................................................................................................................
................................................73
Adobe Photoshop CC
JavaScript Scripting Reference 10
Channel............................................................................................................................................................................................74
Properties..................................................................................................................................................................................74
color....................................................................................................................................................................................74
histogram .........................................................................................................................................................................74
kind .....................................................................................................................................................................................74
name...................................................................................................................................................................................74
opacity...............................................................................................................................................................................74
parent.................................................................................................................................................................................74
typename .........................................................................................................................................................................74
visible .................................................................................................................................................................................74
Methods ....................................................................................................................................................................................74
duplicate...........................................................................................................................................................................74
merge.................................................................................................................................................................................75
remove...............................................................................................................................................................................75
Channels..........................................................................................................................................................................................76
Properties..................................................................................................................................................................................76
length.................................................................................................................................................................................76
parent.................................................................................................................................................................................76
typename .........................................................................................................................................................................76
Methods ....................................................................................................................................................................................76
add ......................................................................................................................................................................................76
getByName ......................................................................................................................................................................76
removeAll .........................................................................................................................................................................76
CMYKColor......................................................................................................................................................................................81
Properties..................................................................................................................................................................................81
black ...................................................................................................................................................................................81
cyan.....................................................................................................................................................................................81
magenta............................................................................................................................................................................81
typename .........................................................................................................................................................................81
yellow.................................................................................................................................................................................81
ColorSampler .................................................................................................................................................................................82
Properties..................................................................................................................................................................................82
color....................................................................................................................................................................................82
position .............................................................................................................................................................................82
parent.................................................................................................................................................................................82
typename .........................................................................................................................................................................82
Methods ....................................................................................................................................................................................82
move...................................................................................................................................................................................82
remove...............................................................................................................................................................................82
ColorSamplers ...............................................................................................................................................................................83
Properties..................................................................................................................................................................................83
length.................................................................................................................................................................................83
parent.................................................................................................................................................................................83
typename .........................................................................................................................................................................83
Methods ....................................................................................................................................................................................83
add ......................................................................................................................................................................................83
removeAll .........................................................................................................................................................................83
ContactSheetOptions .................................................................................................................................................................84
Properties..................................................................................................................................................................................84
acrossFirst.........................................................................................................................................................................84
bestFit ........................................................................................................................
........................................................84
Adobe Photoshop CC
JavaScript Scripting Reference 11
caption...............................................................................................................................................................................84
columnCount ..................................................................................................................................................................84
flatten.................................................................................................................................................................................84
font......................................................................................................................................................................................84
fontSize..............................................................................................................................................................................84
height.................................................................................................................................................................................84
horizontal .........................................................................................................................................................................84
mode ..................................................................................................................................................................................84
resolution..........................................................................................................................................................................84
rowCount..........................................................................................................................................................................84
typename .........................................................................................................................................................................84
useAutoSpacing.............................................................................................................................................................84
vertical ...............................................................................................................................................................................84
width ..................................................................................................................................................................................84
CountItem.......................................................................................................................................................................................85
Properties..................................................................................................................................................................................85
position .............................................................................................................................................................................85
parent.................................................................................................................................................................................85
typename .........................................................................................................................................................................85
Methods ....................................................................................................................................................................................85
remove...............................................................................................................................................................................85
CountItems .....................................................................................................................................................................................86
Properties..................................................................................................................................................................................86
length.................................................................................................................................................................................86
parent.................................................................................................................................................................................86
typename .........................................................................................................................................................................86
Methods ....................................................................................................................................................................................86
add ......................................................................................................................................................................................86
getByName ......................................................................................................................................................................86
removeAll .........................................................................................................................................................................86
DCS1_SaveOptions......................................................................................................................................................................87
Properties..................................................................................................................................................................................87
dCS......................................................................................................................................................................................87
embedColorProfile........................................................................................................................................................87
encoding...........................................................................................................................................................................87
halftoneScreen ...............................................................................................................................................................87
interpolation....................................................................................................................................................................87
preview..............................................................................................................................................................................87
transferFunction.............................................................................................................................................................87
typename .........................................................................................................................................................................87
vectorData........................................................................................................................................................................87
DCS2_SaveOptions......................................................................................................................................................................88
Properties..................................................................................................................................................................................88
dCS......................................................................................................................................................................................88
embedColorProfile........................................................................................................................................................88
encoding...........................................................................................................................................................................88
halftoneScreen ...............................................................................................................................................................88
interpolation....................................................................................................................................................................88
multiFileDCS....................................................................................................................................................................88
preview..............................................................................................................................................................................88
spotColors .....................................................................................................................
...................................................88
Adobe Photoshop CC
JavaScript Scripting Reference 12
transferFunction.............................................................................................................................................................88
typename .........................................................................................................................................................................88
vectorData........................................................................................................................................................................88
DICOMOpenOptions...................................................................................................................................................................89
Properties..................................................................................................................................................................................89
anonymize........................................................................................................................................................................89
columns.............................................................................................................................................................................89
reverse ...............................................................................................................................................................................89
rows ....................................................................................................................................................................................89
showOverlays..................................................................................................................................................................89
typename .........................................................................................................................................................................89
windowLevel...................................................................................................................................................................89
windowWidth .................................................................................................................................................................89
Document .......................................................................................................................................................................................90
Properties..................................................................................................................................................................................90
activeChannels ...............................................................................................................................................................90
activeHistoryBrushSource ..........................................................................................................................................90
activeHistoryState .........................................................................................................................................................90
activeLayer .......................................................................................................................................................................90
artLayers............................................................................................................................................................................90
backgroundLayer...........................................................................................................................................................90
bitsPerChannel ...............................................................................................................................................................90
channels............................................................................................................................................................................90
colorProfileName...........................................................................................................................................................90
colorProfileType.............................................................................................................................................................90
colorSamplers .................................................................................................................................................................90
componentChannels....................................................................................................................................................90
countItems.......................................................................................................................................................................91
fullName............................................................................................................................................................................91
guides ................................................................................................................................................................................91
height.................................................................................................................................................................................91
histogram .........................................................................................................................................................................91
historyStates....................................................................................................................................................................91
info......................................................................................................................................................................................91
layerComps......................................................................................................................................................................91
layers ..................................................................................................................................................................................91
layerSets............................................................................................................................................................................91
managed...........................................................................................................................................................................91
measurementScale .......................................................................................................................................................91
mode ..................................................................................................................................................................................91
name...................................................................................................................................................................................91
parent.................................................................................................................................................................................91
path.....................................................................................................................................................................................91
pathItems .........................................................................................................................................................................91
pixelAspectRatio ............................................................................................................................................................91
printSettings....................................................................................................................................................................91
quickMaskMode.............................................................................................................................................................92
resolution..........................................................................................................................................................................92
saved ..................................................................................................................................................................................92
selection............................................................................................................................................................................92
typename .......................................................................................................................
..................................................92
Adobe Photoshop CC
JavaScript Scripting Reference 13
width ..................................................................................................................................................................................92
xmpMetadata..................................................................................................................................................................92
Methods ....................................................................................................................................................................................93
autoCount ........................................................................................................................................................................93
changeMode ...................................................................................................................................................................93
close....................................................................................................................................................................................93
convertProfile..................................................................................................................................................................93
crop.....................................................................................................................................................................................93
duplicate...........................................................................................................................................................................93
exportDocument ...........................................................................................................................................................94
flatten.................................................................................................................................................................................94
flipCanvas .........................................................................................................................................................................94
importAnnotations .......................................................................................................................................................94
mergeVisibleLayers.......................................................................................................................................................94
paste...................................................................................................................................................................................94
print ....................................................................................................................................................................................94
printOneCopy .................................................................................................................................................................94
rasterizeAllLayers...........................................................................................................................................................94
recordMeasurements...................................................................................................................................................94
resizeCanvas....................................................................................................................................................................94
resizeImage......................................................................................................................................................................95
revealAll.............................................................................................................................................................................95
rotateCanvas ...................................................................................................................................................................95
save.....................................................................................................................................................................................95
saveAs ................................................................................................................................................................................95
splitChannels...................................................................................................................................................................95
suspendHistory...............................................................................................................................................................95
trap......................................................................................................................................................................................95
trim......................................................................................................................................................................................96
DocumentPrintSettings .............................................................................................................................................................98
Properties..................................................................................................................................................................................98
backgroundColor...........................................................................................................................................................98
bleedWidth ......................................................................................................................................................................98
caption...............................................................................................................................................................................98
centerCropMarks ...........................................................................................................................................................98
colorBars ...........................................................................................................................................................................98
copies.................................................................................................................................................................................98
cornerCropMarks ...........................................................................................................................................................98
colorHandling .................................................................................................................................................................98
activePrinter ....................................................................................................................................................................98
flip........................................................................................................................................................................................98
hardProof..........................................................................................................................................................................98
interpolate........................................................................................................................................................................98
labels ..................................................................................................................................................................................98
mapBlack ..........................................................................................................................................................................98
negative ............................................................................................................................................................................98
renderIntent ....................................................................................................................................................................98
posX....................................................................................................................................................................................98
posY....................................................................................................................................................................................98
printBorder.......................................................................................................................................................................98
printerName ....................................................................................................................
................................................98
Adobe Photoshop CC
JavaScript Scripting Reference 14
printSpace ........................................................................................................................................................................98
registrationMarks...........................................................................................................................................................98
scale....................................................................................................................................................................................99
vectorData........................................................................................................................................................................99
Methods ................................................................................................................................................................................. 100
setPagePosition........................................................................................................................................................... 100
DocumentInfo ............................................................................................................................................................................ 101
Properties............................................................................................................................................................................... 101
author ............................................................................................................................................................................. 101
authorPosition ............................................................................................................................................................. 101
caption............................................................................................................................................................................ 101
captionWriter ............................................................................................................................................................... 101
category ......................................................................................................................................................................... 101
city.................................................................................................................................................................................... 101
copyrighted .................................................................................................................................................................. 101
copyrightNotice .......................................................................................................................................................... 101
country ........................................................................................................................................................................... 101
creationDate................................................................................................................................................................. 101
credit ............................................................................................................................................................................... 101
exif.................................................................................................................................................................................... 101
headline ......................................................................................................................................................................... 101
instructions ................................................................................................................................................................... 101
jobName ........................................................................................................................................................................ 101
keywords........................................................................................................................................................................ 101
ownerUrl ........................................................................................................................................................................ 101
parent.............................................................................................................................................................................. 102
provinceState............................................................................................................................................................... 102
source.............................................................................................................................................................................. 102
supplementalCategories.......................................................................................................................................... 102
title................................................................................................................................................................................... 102
transmissionReference ............................................................................................................................................. 102
typename ...................................................................................................................................................................... 102
urgency .......................................................................................................................................................................... 102
Documents .................................................................................................................................................................................. 104
Properties............................................................................................................................................................................... 104
length.............................................................................................................................................................................. 104
parent.............................................................................................................................................................................. 104
typename ...................................................................................................................................................................... 104
Methods ................................................................................................................................................................................. 104
add ................................................................................................................................................................................... 104
getByName ................................................................................................................................................................... 104
EPSOpenOptions ....................................................................................................................................................................... 105
Properties............................................................................................................................................................................... 105
antiAlias.......................................................................................................................................................................... 105
constrainProportions ................................................................................................................................................ 105
height.............................................................................................................................................................................. 105
mode ............................................................................................................................................................................... 105
resolution....................................................................................................................................................................... 105
typename ...................................................................................................................................................................... 105
width ............................................................................................................................................................................... 105
EPSSaveOptions.................................................................................................................
........................................................ 106
Adobe Photoshop CC
JavaScript Scripting Reference 15
Properties............................................................................................................................................................................... 106
embedColorProfile..................................................................................................................................................... 106
encoding........................................................................................................................................................................ 106
halftoneScreen ............................................................................................................................................................ 106
interpolation................................................................................................................................................................. 106
preview........................................................................................................................................................................... 106
psColorManagement ................................................................................................................................................ 106
transferFunction.......................................................................................................................................................... 106
transparentWhites...................................................................................................................................................... 106
typename ...................................................................................................................................................................... 106
vectorData..................................................................................................................................................................... 106
ExportOptionsIllustrator......................................................................................................................................................... 107
Properties............................................................................................................................................................................... 107
path.................................................................................................................................................................................. 107
pathName...................................................................................................................................................................... 107
typename ...................................................................................................................................................................... 107
ExportOptionsSaveForWeb ................................................................................................................................................... 108
Properties............................................................................................................................................................................... 108
blur................................................................................................................................................................................... 108
colorReduction ............................................................................................................................................................ 108
colors............................................................................................................................................................................... 108
dither............................................................................................................................................................................... 108
ditherAmount .............................................................................................................................................................. 108
format ............................................................................................................................................................................. 108
includeProfile ............................................................................................................................................................... 108
interlaced....................................................................................................................................................................... 108
lossy................................................................................................................................................................................. 108
matteColor .................................................................................................................................................................... 108
optimized ...................................................................................................................................................................... 108
PNG8................................................................................................................................................................................ 108
quality ............................................................................................................................................................................. 109
transparency................................................................................................................................................................. 109
transparencyAmount................................................................................................................................................ 109
transparencyDither.................................................................................................................................................... 109
typename ...................................................................................................................................................................... 109
webSnap ........................................................................................................................................................................ 109
File................................................................................................................................................................................................... 110
Folder............................................................................................................................................................................................. 110
GalleryBannerOptions ............................................................................................................................................................. 111
Properties............................................................................................................................................................................... 111
contactInfo.................................................................................................................................................................... 111
date.................................................................................................................................................................................. 111
font................................................................................................................................................................................... 111
fontSize........................................................................................................................................................................... 111
photographer............................................................................................................................................................... 111
siteName........................................................................................................................................................................ 111
typename ...................................................................................................................................................................... 111
GalleryCustomColorOptions................................................................................................................................................. 112
Properties............................................................................................................................................................................... 112
activeLinkColor............................................................................................................................................................ 112
backgroundColor........................................................................................................................................................ 112
Adobe Photoshop CC
JavaScript Scripting Reference 16
bannerColor.................................................................................................................................................................. 112
linkColor......................................................................................................................................................................... 112
textColor ........................................................................................................................................................................ 112
typename ...................................................................................................................................................................... 112
visitedLinkColor........................................................................................................................................................... 112
GalleryImagesOptions............................................................................................................................................................. 113
Properties............................................................................................................................................................................... 113
border ............................................................................................................................................................................. 113
caption............................................................................................................................................................................ 113
dimension...................................................................................................................................................................... 113
font................................................................................................................................................................................... 113
fontSize........................................................................................................................................................................... 113
imageQuality................................................................................................................................................................ 113
includeCopyright........................................................................................................................................................ 113
includeCredits.............................................................................................................................................................. 113
includeFilename.......................................................................................................................................................... 113
includeTitle ................................................................................................................................................................... 113
numericLinks................................................................................................................................................................ 113
resizeConstraint .......................................................................................................................................................... 114
resizeImages................................................................................................................................................................. 114
typename ...................................................................................................................................................................... 114
GalleryOptions............................................................................................................................................................................ 115
Properties............................................................................................................................................................................... 115
addSizeAttributes....................................................................................................................................................... 115
bannerOptions ............................................................................................................................................................ 115
customColorOptions................................................................................................................................................. 115
emailAddress................................................................................................................................................................ 115
imagesOptions ............................................................................................................................................................ 115
includeSubFolders ..................................................................................................................................................... 115
layoutStyle .................................................................................................................................................................... 115
preserveAllMetadata................................................................................................................................................. 115
securityOptions ........................................................................................................................................................... 115
thumbnailOptions...................................................................................................................................................... 115
typename ...................................................................................................................................................................... 115
useShortExtension ..................................................................................................................................................... 115
useUTF8Encoding ...................................................................................................................................................... 115
GallerySecurityOptions ........................................................................................................................................................... 116
Properties............................................................................................................................................................................... 116
content ........................................................................................................................................................................... 116
font................................................................................................................................................................................... 116
fontSize........................................................................................................................................................................... 116
opacity............................................................................................................................................................................ 116
text................................................................................................................................................................................... 116
textColor ........................................................................................................................................................................ 116
textPosition................................................................................................................................................................... 116
textRotate...................................................................................................................................................................... 116
typename ...................................................................................................................................................................... 116
GalleryThumbnailOptions...................................................................................................................................................... 117
Properties............................................................................................................................................................................... 117
border ............................................................................................................................................................................. 117
caption............................................................................................................................................................................ 117
Adobe Photoshop CC
JavaScript Scripting Reference 17
columnCount ............................................................................................................................................................... 117
dimension...................................................................................................................................................................... 117
font................................................................................................................................................................................... 117
fontSize........................................................................................................................................................................... 117
includeCopyright........................................................................................................................................................ 117
includeCredits.............................................................................................................................................................. 117
includeFilename.......................................................................................................................................................... 117
includeTitle ................................................................................................................................................................... 117
rowCount....................................................................................................................................................................... 117
size ................................................................................................................................................................................... 117
typename ...................................................................................................................................................................... 117
GIFSaveOptions.......................................................................................................................................................................... 118
Properties............................................................................................................................................................................... 118
colors............................................................................................................................................................................... 118
dither............................................................................................................................................................................... 118
ditherAmount .............................................................................................................................................................. 118
forced.............................................................................................................................................................................. 118
interlaced....................................................................................................................................................................... 118
matte............................................................................................................................................................................... 118
palette............................................................................................................................................................................. 118
preserveExactColors.................................................................................................................................................. 118
transparency................................................................................................................................................................. 118
typename ...................................................................................................................................................................... 118
GrayColor...................................................................................................................................................................................... 119
Properties............................................................................................................................................................................... 119
gray.................................................................................................................................................................................. 119
typename ...................................................................................................................................................................... 119
Guide.............................................................................................................................................................................................. 120
Properties............................................................................................................................................................................... 120
direction......................................................................................................................................................................... 120
coordinate..................................................................................................................................................................... 120
Guides............................................................................................................................................................................................ 121
Properties............................................................................................................................................................................... 121
length.............................................................................................................................................................................. 121
parent.............................................................................................................................................................................. 121
typename ...................................................................................................................................................................... 121
Methods ................................................................................................................................................................................. 121
add ................................................................................................................................................................................... 121
getByName ................................................................................................................................................................... 121
HistoryState................................................................................................................................................................................. 122
Properties............................................................................................................................................................................... 122
name................................................................................................................................................................................ 122
parent.............................................................................................................................................................................. 122
snapshot ........................................................................................................................................................................ 122
typename ...................................................................................................................................................................... 122
HistoryStates ............................................................................................................................................................................... 123
Properties............................................................................................................................................................................... 123
length.............................................................................................................................................................................. 123
parent.............................................................................................................................................................................. 123
typename ...................................................................................................................................................................... 123
Methods ........................................................................................................................
......................................................... 123
Adobe Photoshop CC
JavaScript Scripting Reference 18
getByName ................................................................................................................................................................... 123
HSBColor....................................................................................................................................................................................... 124
Properties............................................................................................................................................................................... 124
brightness...................................................................................................................................................................... 124
hue ................................................................................................................................................................................... 124
saturation ...................................................................................................................................................................... 124
typename ...................................................................................................................................................................... 124
IndexedConversionOptions .................................................................................................................................................. 125
Properties............................................................................................................................................................................... 125
colors............................................................................................................................................................................... 125
dither............................................................................................................................................................................... 125
ditherAmount .............................................................................................................................................................. 125
forced.............................................................................................................................................................................. 125
matte............................................................................................................................................................................... 125
palette............................................................................................................................................................................. 125
preserveExactColors.................................................................................................................................................. 125
transparency................................................................................................................................................................. 125
typename ...................................................................................................................................................................... 125
JPEGSaveOptions ...................................................................................................................................................................... 126
Properties............................................................................................................................................................................... 126
embedColorProfile..................................................................................................................................................... 126
formatOptions ............................................................................................................................................................. 126
matte............................................................................................................................................................................... 126
quality ............................................................................................................................................................................. 126
scans................................................................................................................................................................................ 126
typename ...................................................................................................................................................................... 126
LabColor ....................................................................................................................................................................................... 127
Properties............................................................................................................................................................................... 127
a......................................................................................................................................................................................... 127
b ........................................................................................................................................................................................ 127
l.......................................................................................................................................................................................... 127
typename ...................................................................................................................................................................... 127
LayerComp................................................................................................................................................................................... 128
Properties............................................................................................................................................................................... 128
appearance ................................................................................................................................................................... 128
comment ....................................................................................................................................................................... 128
name................................................................................................................................................................................ 128
parent.............................................................................................................................................................................. 128
position .......................................................................................................................................................................... 128
selected .......................................................................................................................................................................... 128
typename ...................................................................................................................................................................... 128
visibility .......................................................................................................................................................................... 128
Methods ................................................................................................................................................................................. 128
apply................................................................................................................................................................................ 128
recapture ....................................................................................................................................................................... 128
remove............................................................................................................................................................................ 128
resetfromComp ........................................................................................................................................................... 128
LayerComps................................................................................................................................................................................. 129
Properties............................................................................................................................................................................... 129
length.............................................................................................................................................................................. 129
parent.........................................................................................................................
..................................................... 129
Adobe Photoshop CC
JavaScript Scripting Reference 19
typename ...................................................................................................................................................................... 129
Methods ................................................................................................................................................................................. 129
add ................................................................................................................................................................................... 129
getByName ................................................................................................................................................................... 129
removeAll ...................................................................................................................................................................... 129
Layers............................................................................................................................................................................................. 130
Properties............................................................................................................................................................................... 130
length.............................................................................................................................................................................. 130
parent.............................................................................................................................................................................. 130
typename ...................................................................................................................................................................... 130
Methods ................................................................................................................................................................................. 130
getByName ................................................................................................................................................................... 130
removeAll ...................................................................................................................................................................... 130
LayerSet ........................................................................................................................................................................................ 131
Properties............................................................................................................................................................................... 131
allLocked........................................................................................................................................................................ 131
artLayers......................................................................................................................................................................... 131
blendMode.................................................................................................................................................................... 131
bounds............................................................................................................................................................................ 131
enabledChannels........................................................................................................................................................ 131
layers ............................................................................................................................................................................... 131
layerSets......................................................................................................................................................................... 131
linkedLayers.................................................................................................................................................................. 131
name................................................................................................................................................................................ 131
opacity............................................................................................................................................................................ 131
parent.............................................................................................................................................................................. 131
typename ...................................................................................................................................................................... 131
visible .............................................................................................................................................................................. 131
Methods ................................................................................................................................................................................. 132
duplicate........................................................................................................................................................................ 132
link.................................................................................................................................................................................... 132
merge.............................................................................................................................................................................. 132
move................................................................................................................................................................................ 132
remove............................................................................................................................................................................ 132
resize ............................................................................................................................................................................... 132
rotate............................................................................................................................................................................... 132
translate ......................................................................................................................................................................... 132
unlink .............................................................................................................................................................................. 132
LayerSets ...................................................................................................................................................................................... 133
Properties............................................................................................................................................................................... 133
length.............................................................................................................................................................................. 133
parent.............................................................................................................................................................................. 133
typename ...................................................................................................................................................................... 133
Methods ................................................................................................................................................................................. 133
add ................................................................................................................................................................................... 133
getByName ................................................................................................................................................................... 133
removeAll ...................................................................................................................................................................... 133
MeasurementLog ...................................................................................................................................................................... 135
Methods ................................................................................................................................................................................. 135
exportMeasurements................................................................................................................................................ 135
deleteMeasurements .............................................................................................................
................................... 135
Adobe Photoshop CC
JavaScript Scripting Reference 20
MeasurementScale ................................................................................................................................................................... 136
Properties............................................................................................................................................................................... 136
pixelLength................................................................................................................................................................... 136
logicalLength ............................................................................................................................................................... 136
logicalUnits ................................................................................................................................................................... 136
NoColor......................................................................................................................................................................................... 137
Properties............................................................................................................................................................................... 137
typename ...................................................................................................................................................................... 137
Notifier........................................................................................................................................................................................... 138
Properties............................................................................................................................................................................... 138
event................................................................................................................................................................................ 138
eventClass ..................................................................................................................................................................... 138
eventFile ........................................................................................................................................................................ 138
parent.............................................................................................................................................................................. 138
typename ...................................................................................................................................................................... 138
Methods ................................................................................................................................................................................. 138
remove............................................................................................................................................................................ 138
Notifiers......................................................................................................................................................................................... 139
Properties............................................................................................................................................................................... 139
length.............................................................................................................................................................................. 139
parent.............................................................................................................................................................................. 139
typename ...................................................................................................................................................................... 139
Methods ................................................................................................................................................................................. 139
add ................................................................................................................................................................................... 139
removeAll ...................................................................................................................................................................... 139
PathItem ....................................................................................................................................................................................... 140
Properties............................................................................................................................................................................... 140
kind .................................................................................................................................................................................. 140
name................................................................................................................................................................................ 140
parent.............................................................................................................................................................................. 140
subPathItems ............................................................................................................................................................... 140
typename ...................................................................................................................................................................... 140
Methods ................................................................................................................................................................................. 140
deselect .......................................................................................................................................................................... 140
duplicate........................................................................................................................................................................ 140
fillPath............................................................................................................................................................................. 140
makeClippingPath...................................................................................................................................................... 141
makeSelection ............................................................................................................................................................. 141
remove............................................................................................................................................................................ 141
select ............................................................................................................................................................................... 141
strokePath ..................................................................................................................................................................... 141
PathItems ..................................................................................................................................................................................... 144
Properties............................................................................................................................................................................... 144
length.............................................................................................................................................................................. 144
parent.............................................................................................................................................................................. 144
typename ...................................................................................................................................................................... 144
Methods ................................................................................................................................................................................. 144
add ................................................................................................................................................................................... 144
getByName ................................................................................................................................................................... 144
removeAll ...................................................................................................................................................................... 144
PathPoint......................................................................................................................
................................................................ 145
Adobe Photoshop CC
JavaScript Scripting Reference 21
Properties............................................................................................................................................................................... 145
anchor............................................................................................................................................................................. 145
kind .................................................................................................................................................................................. 145
leftDirection.................................................................................................................................................................. 145
parent.............................................................................................................................................................................. 145
rightDirection............................................................................................................................................................... 145
typename ...................................................................................................................................................................... 145
PathPointInfo.............................................................................................................................................................................. 146
Properties............................................................................................................................................................................... 146
anchor............................................................................................................................................................................. 146
kind .................................................................................................................................................................................. 146
leftDirection.................................................................................................................................................................. 146
rightDirection............................................................................................................................................................... 146
typename ...................................................................................................................................................................... 146
PathPoints.................................................................................................................................................................................... 148
Properties............................................................................................................................................................................... 148
length.............................................................................................................................................................................. 148
parent.............................................................................................................................................................................. 148
typename ...................................................................................................................................................................... 148
PDFOpenOptions ...................................................................................................................................................................... 149
Properties............................................................................................................................................................................... 149
antiAlias.......................................................................................................................................................................... 149
bitsPerChannel ............................................................................................................................................................ 149
constrainProportions ................................................................................................................................................ 149
cropPage........................................................................................................................................................................ 149
height.............................................................................................................................................................................. 149
mode ............................................................................................................................................................................... 149
name................................................................................................................................................................................ 149
object .............................................................................................................................................................................. 149
page................................................................................................................................................................................. 149
resolution....................................................................................................................................................................... 149
suppressWarnings...................................................................................................................................................... 149
typename ...................................................................................................................................................................... 149
use3DObjectNumber ................................................................................................................................................ 149
usePageNumber ......................................................................................................................................................... 149
width ............................................................................................................................................................................... 149
PDFSaveOptions........................................................................................................................................................................ 150
Properties............................................................................................................................................................................... 150
alphaChannels............................................................................................................................................................. 150
annotations................................................................................................................................................................... 150
colorConversion.......................................................................................................................................................... 150
convertToEightBit....................................................................................................................................................... 150
description .................................................................................................................................................................... 150
destinationProfile ....................................................................................................................................................... 150
downgradeColorProfile............................................................................................................................................ 150
downSample ................................................................................................................................................................ 150
downSampleSize ........................................................................................................................................................ 150
downSampleSizeLimit .............................................................................................................................................. 150
embedColorProfile..................................................................................................................................................... 150
embedFonts ................................................................................................................................................................. 150
embedThumbnail.................................................................................................................
...................................... 150
Adobe Photoshop CC
JavaScript Scripting Reference 22
encoding........................................................................................................................................................................ 150
interpolation................................................................................................................................................................. 150
jpegQuality ................................................................................................................................................................... 151
layers ............................................................................................................................................................................... 151
optimizeForWeb ......................................................................................................................................................... 151
outputCondition......................................................................................................................................................... 151
outputConditionID..................................................................................................................................................... 151
PDFCompatibility........................................................................................................................................................ 151
PDFStandard ................................................................................................................................................................ 151
preserveEditing ........................................................................................................................................................... 151
presetFile ....................................................................................................................................................................... 151
profileInclusionPolicy................................................................................................................................................ 151
registryName................................................................................................................................................................ 151
spotColors ..................................................................................................................................................................... 151
tileSize............................................................................................................................................................................. 151
transparency................................................................................................................................................................. 151
typename ...................................................................................................................................................................... 151
useOutlines................................................................................................................................................................... 151
vectorData..................................................................................................................................................................... 152
view.................................................................................................................................................................................. 152
PhotoCDOpenOptions ............................................................................................................................................................ 153
Properties............................................................................................................................................................................... 153
colorProfileName........................................................................................................................................................ 153
colorSpace..................................................................................................................................................................... 153
orientation..................................................................................................................................................................... 153
pixelSize ......................................................................................................................................................................... 153
resolution....................................................................................................................................................................... 153
typename ...................................................................................................................................................................... 153
PhotoshopSaveOptions.......................................................................................................................................................... 154
Properties............................................................................................................................................................................... 154
alphaChannels............................................................................................................................................................. 154
annotations................................................................................................................................................................... 154
embedColorProfile..................................................................................................................................................... 154
layers ............................................................................................................................................................................... 154
spotColors ..................................................................................................................................................................... 154
typename ...................................................................................................................................................................... 154
PICTFileSaveOptions ................................................................................................................................................................ 155
Properties............................................................................................................................................................................... 155
alphaChannels............................................................................................................................................................. 155
compression................................................................................................................................................................. 155
embedColorProfile..................................................................................................................................................... 155
resolution....................................................................................................................................................................... 155
typename ...................................................................................................................................................................... 155
PICTResourceSaveOptions..................................................................................................................................................... 156
Properties............................................................................................................................................................................... 156
alphaChannels............................................................................................................................................................. 156
compression................................................................................................................................................................. 156
embedColorProfile..................................................................................................................................................... 156
name................................................................................................................................................................................ 156
resolution....................................................................................................................................................................... 156
resourceID .....................................................................................................................
................................................ 156
Adobe Photoshop CC
JavaScript Scripting Reference 23
typename ...................................................................................................................................................................... 156
PicturePackageOptions........................................................................................................................................................... 157
Properties............................................................................................................................................................................... 157
content ........................................................................................................................................................................... 157
flatten.............................................................................................................................................................................. 157
font................................................................................................................................................................................... 157
fontSize........................................................................................................................................................................... 157
layout .............................................................................................................................................................................. 157
mode ............................................................................................................................................................................... 157
opacity............................................................................................................................................................................ 157
resolution....................................................................................................................................................................... 157
text................................................................................................................................................................................... 157
textColor ........................................................................................................................................................................ 157
textPosition................................................................................................................................................................... 157
textRotate...................................................................................................................................................................... 157
typename ...................................................................................................................................................................... 157
PixarSaveOptions ...................................................................................................................................................................... 158
Properties............................................................................................................................................................................... 158
alphaChannels............................................................................................................................................................. 158
typename ...................................................................................................................................................................... 158
PNGSaveOptions ....................................................................................................................................................................... 159
Properties............................................................................................................................................................................... 159
compression................................................................................................................................................................. 159
interlaced....................................................................................................................................................................... 159
typename ...................................................................................................................................................................... 159
Preferences .................................................................................................................................................................................. 160
Properties............................................................................................................................................................................... 160
additionalPluginFolder............................................................................................................................................. 160
appendExtension........................................................................................................................................................ 160
askBeforeSavingLayeredTIFF.................................................................................................................................. 160
autoUpdateOpenDocuments ................................................................................................................................ 160
beepWhenDone.......................................................................................................................................................... 160
colorChannelsInColor ............................................................................................................................................... 160
colorPicker..................................................................................................................................................................... 160
columnGutter............................................................................................................................................................... 160
columnWidth ............................................................................................................................................................... 160
createFirstSnapshot................................................................................................................................................... 160
dynamicColorSliders.................................................................................................................................................. 160
editLogItems ................................................................................................................................................................ 160
exportClipboard.......................................................................................................................................................... 161
fontPreviewSize........................................................................................................................................................... 161
fullSizePreview............................................................................................................................................................. 161
gamutWarningOpacity............................................................................................................................................. 161
gridSize........................................................................................................................................................................... 161
gridStyle......................................................................................................................................................................... 161
gridSubDivisions......................................................................................................................................................... 161
guideStyle...................................................................................................................................................................... 161
iconPreview .................................................................................................................................................................. 161
imageCacheLevels ..................................................................................................................................................... 161
imagePreviews ............................................................................................................................................................ 161
interpolation..................................................................................................................
............................................... 161
Adobe Photoshop CC
JavaScript Scripting Reference 24
keyboardZoomResizesWindows........................................................................................................................... 161
macOSThumbnail....................................................................................................................................................... 161
maximizeCompatibility ............................................................................................................................................ 161
maxRAMuse.................................................................................................................................................................. 161
nonLinearHistory ........................................................................................................................................................ 161
numberofHistoryStates ............................................................................................................................................ 162
otherCursors................................................................................................................................................................. 162
paintingCursors........................................................................................................................................................... 162
parent.............................................................................................................................................................................. 162
pixelDoubling .............................................................................................................................................................. 162
pointSize ........................................................................................................................................................................ 162
recentFileListLength.................................................................................................................................................. 162
rulerUnits ....................................................................................................................................................................... 162
saveLogItems ............................................................................................................................................................... 162
saveLogItemsFile ........................................................................................................................................................ 162
savePaletteLocations ................................................................................................................................................ 162
showAsianTextOptions ............................................................................................................................................ 162
showEnglishFontNames .......................................................................................................................................... 162
showSliceNumber ...................................................................................................................................................... 162
showToolTips ............................................................................................................................................................... 162
smartQuotes................................................................................................................................................................. 162
textFontSize.................................................................................................................................................................. 162
typename ...................................................................................................................................................................... 162
typeUnits ....................................................................................................................................................................... 163
useAdditionalPluginFolder ..................................................................................................................................... 163
useHistoryLog.............................................................................................................................................................. 163
useLowerCaseExtension .......................................................................................................................................... 163
useShiftKeyForToolSwitch....................................................................................................................................... 163
useVideoAlpha ............................................................................................................................................................ 163
windowsThumbnail................................................................................................................................................... 163
PresentationOptions................................................................................................................................................................ 164
Properties............................................................................................................................................................................... 164
autoAdvance ............................................................................................................................................................... 164
includeFilename.......................................................................................................................................................... 164
interval............................................................................................................................................................................ 164
loop.................................................................................................................................................................................. 164
magnification............................................................................................................................................................... 164
PDFFileOptions............................................................................................................................................................ 164
presentation ................................................................................................................................................................ 164
transition........................................................................................................................................................................ 164
typename ...................................................................................................................................................................... 164
RawFormatOpenOptions ....................................................................................................................................................... 165
Properties............................................................................................................................................................................... 165
bitsPerChannel ............................................................................................................................................................ 165
byteOrder ...................................................................................................................................................................... 165
channelNumber .......................................................................................................................................................... 165
headerSize..................................................................................................................................................................... 165
height.............................................................................................................................................................................. 165
interleaveChannels .................................................................................................................................................... 165
retainHeader................................................................................................................................................................. 165
typename .......................................................................................................................
............................................... 165
Adobe Photoshop CC
JavaScript Scripting Reference 25
width ............................................................................................................................................................................... 165
RawSaveOptions........................................................................................................................................................................ 166
Properties............................................................................................................................................................................... 166
alphaChannels............................................................................................................................................................. 166
spotColors ..................................................................................................................................................................... 166
typename ...................................................................................................................................................................... 166
RGBColor....................................................................................................................................................................................... 167
Properties............................................................................................................................................................................... 167
blue.................................................................................................................................................................................. 167
green ............................................................................................................................................................................... 167
hexValue ........................................................................................................................................................................ 167
red .................................................................................................................................................................................... 167
typename ...................................................................................................................................................................... 167
Selection ....................................................................................................................................................................................... 168
Properties............................................................................................................................................................................... 168
bounds............................................................................................................................................................................ 168
parent.............................................................................................................................................................................. 168
solid ................................................................................................................................................................................. 168
typename ...................................................................................................................................................................... 168
Methods ................................................................................................................................................................................. 168
clear ................................................................................................................................................................................. 168
contract .......................................................................................................................................................................... 168
copy ................................................................................................................................................................................. 168
cut..................................................................................................................................................................................... 168
deselect .......................................................................................................................................................................... 168
expand............................................................................................................................................................................ 168
feather............................................................................................................................................................................. 168
fill ...................................................................................................................................................................................... 169
grow ................................................................................................................................................................................ 169
invert ............................................................................................................................................................................... 169
load .................................................................................................................................................................................. 169
makeWorkPath ............................................................................................................................................................ 169
resize ............................................................................................................................................................................... 169
resizeBoundary............................................................................................................................................................ 169
rotate............................................................................................................................................................................... 169
rotateBoundary ........................................................................................................................................................... 169
select ............................................................................................................................................................................... 169
selectAll.......................................................................................................................................................................... 169
selectBorder.................................................................................................................................................................. 170
similar.............................................................................................................................................................................. 170
smooth ........................................................................................................................................................................... 170
store................................................................................................................................................................................. 170
stroke............................................................................................................................................................................... 170
translate ......................................................................................................................................................................... 170
translateBoundary...................................................................................................................................................... 170
SGIRGBSaveOptions ................................................................................................................................................................. 173
Properties............................................................................................................................................................................... 173
alphaChannels............................................................................................................................................................. 173
spotColors ..................................................................................................................................................................... 173
typename ...................................................................................................................................................................... 173
SolidColor.....................................................................................................................
................................................................ 174
Adobe Photoshop CC
JavaScript Scripting Reference 26
Properties............................................................................................................................................................................... 174
cmyk ................................................................................................................................................................................ 174
gray.................................................................................................................................................................................. 174
hsb.................................................................................................................................................................................... 174
lab..................................................................................................................................................................................... 174
model.............................................................................................................................................................................. 174
nearestWebColor........................................................................................................................................................ 174
rgb.................................................................................................................................................................................... 174
typename ...................................................................................................................................................................... 174
Methods ................................................................................................................................................................................. 174
isEqual............................................................................................................................................................................. 174
SubPathInfo................................................................................................................................................................................. 175
Properties............................................................................................................................................................................... 175
closed.............................................................................................................................................................................. 175
entireSubPath .............................................................................................................................................................. 175
operation ....................................................................................................................................................................... 175
typename ...................................................................................................................................................................... 175
SubPathItem................................................................................................................................................................................ 176
Properties............................................................................................................................................................................... 176
closed.............................................................................................................................................................................. 176
operation ....................................................................................................................................................................... 176
parent.............................................................................................................................................................................. 176
pathPoints..................................................................................................................................................................... 176
typename ...................................................................................................................................................................... 176
SubPathItems.............................................................................................................................................................................. 177
Properties............................................................................................................................................................................... 177
length.............................................................................................................................................................................. 177
parent.............................................................................................................................................................................. 177
typename ...................................................................................................................................................................... 177
TargaSaveOptions..................................................................................................................................................................... 178
Properties............................................................................................................................................................................... 178
alphaChannels............................................................................................................................................................. 178
resolution....................................................................................................................................................................... 178
rleCompression ........................................................................................................................................................... 178
typename ...................................................................................................................................................................... 178
TextFont........................................................................................................................................................................................ 179
Properties............................................................................................................................................................................... 179
family............................................................................................................................................................................... 179
name................................................................................................................................................................................ 179
parent.............................................................................................................................................................................. 179
postScriptName ......................................................................................................................................................... 179
style.................................................................................................................................................................................. 179
typename ...................................................................................................................................................................... 179
TextFonts...................................................................................................................................................................................... 180
Properties............................................................................................................................................................................... 180
length.............................................................................................................................................................................. 180
parent.............................................................................................................................................................................. 180
typename ...................................................................................................................................................................... 180
Methods ................................................................................................................................................................................. 180
getByName ................................................................................................................................................................... 180
TextItem........................................................................................................................................................................................ 181
Adobe Photoshop CC
JavaScript Scripting Reference 27
Properties............................................................................................................................................................................... 181
alternateLigatures ...................................................................................................................................................... 181
antiAliasMethod.......................................................................................................................................................... 181
autoKerning.................................................................................................................................................................. 181
autoLeadingAmount................................................................................................................................................. 181
baselineShift................................................................................................................................................................. 181
capitalization................................................................................................................................................................ 181
color................................................................................................................................................................................. 181
contents ......................................................................................................................................................................... 181
desiredGlyphScaling.................................................................................................................................................. 181
desiredLetterScaling.................................................................................................................................................. 182
desiredWordScaling .................................................................................................................................................. 182
direction......................................................................................................................................................................... 182
fauxBold ......................................................................................................................................................................... 182
fauxItalic......................................................................................................................................................................... 182
firstLineIndent.............................................................................................................................................................. 182
font................................................................................................................................................................................... 182
hangingPunctuation ................................................................................................................................................. 182
height.............................................................................................................................................................................. 182
horizontalScale............................................................................................................................................................ 182
hyphenateAfterFirst................................................................................................................................................... 183
hyphenateBeforeLast................................................................................................................................................ 183
hyphenateCapitalWords.......................................................................................................................................... 183
hyphenateWordsLongerThan................................................................................................................................ 183
hyphenation................................................................................................................................................................. 183
hyphenationZone....................................................................................................................................................... 183
hyphenLimit ................................................................................................................................................................. 183
justification ................................................................................................................................................................... 183
kind .................................................................................................................................................................................. 183
language........................................................................................................................................................................ 183
leading............................................................................................................................................................................ 183
leftIndent ....................................................................................................................................................................... 183
ligatures ......................................................................................................................................................................... 183
maximumGlyphScaling............................................................................................................................................ 183
maximumLetterScaling............................................................................................................................................ 184
maximumWordScaling............................................................................................................................................. 184
minimumGlyphScaling............................................................................................................................................. 184
minimumLetterScaling............................................................................................................................................. 185
minimumWordScaling.............................................................................................................................................. 185
noBreak .......................................................................................................................................................................... 185
oldStyle........................................................................................................................................................................... 185
parent.............................................................................................................................................................................. 185
position .......................................................................................................................................................................... 185
rightIndent.................................................................................................................................................................... 185
size ................................................................................................................................................................................... 185
spaceAfter ..................................................................................................................................................................... 185
spaceBefore .................................................................................................................................................................. 186
strikeThru....................................................................................................................................................................... 186
textComposer .............................................................................................................................................................. 186
tracking........................................................................................................................................................................... 186
typename ...................................................................................................................................................................... 186
Adobe Photoshop CC
JavaScript Scripting Reference 28
underline........................................................................................................................................................................ 186
useAutoLeading.......................................................................................................................................................... 186
verticalScale.................................................................................................................................................................. 186
warpBend ...................................................................................................................................................................... 186
warpDirection .............................................................................................................................................................. 186
warpHorizontalDistortion........................................................................................................................................ 186
warpStyle....................................................................................................................................................................... 186
warpVerticalDistortion.............................................................................................................................................. 186
width ............................................................................................................................................................................... 186
Methods ................................................................................................................................................................................. 187
convertToShape.......................................................................................................................................................... 187
createPath ..................................................................................................................................................................... 187
TiffSaveOptions.......................................................................................................................................................................... 188
Properties............................................................................................................................................................................... 188
alphaChannels............................................................................................................................................................. 188
annotations................................................................................................................................................................... 188
byteOrder ...................................................................................................................................................................... 188
embedColorProfile..................................................................................................................................................... 188
imageCompression.................................................................................................................................................... 188
interleaveChannels .................................................................................................................................................... 188
jpegQuality ................................................................................................................................................................... 188
layerCompression....................................................................................................................................................... 188
layers ............................................................................................................................................................................... 188
saveImagePyramid..................................................................................................................................................... 188
spotColors ..................................................................................................................................................................... 188
transparency................................................................................................................................................................. 188
typename ...................................................................................................................................................................... 188
UnitValue...................................................................................................................................................................................... 189
xmpMetadata ............................................................................................................................................................................. 190
Properties............................................................................................................................................................................... 190
parent.............................................................................................................................................................................. 190
rawData.......................................................................................................................................................................... 190
typename ...................................................................................................................................................................... 190
3 JavaScript Resource................................................................................................................. 191
JavaScript resource syntax..................................................................................................................................................... 191
Basic JavaScript resource example............................................................................................................................... 192
Enable-info grammar............................................................................................................................................................... 192
Undefined values in enable-info evaluation............................................................................................................. 195
Using the "in" function...................................................................................................................................................... 195
Action Manager automation................................................................................................................................................. 195
Terminology dictionary .................................................................................................................................................... 195
Value type defintions .................................................................................................................................................. 196
Uniqueness rules for terminology entries.................................................................................................................. 197
Terminology definition example................................................................................................................................... 197
4 Scripting Constants .................................................................................................................199
AdjustmentReference............................................................................................................................................... 199
AnchorPosition............................................................................................................................................................ 199
AntiAlias ......................................................................................................................................................................... 199
AutoKernType.............................................................................................................................................................. 199
BatchDestinationType .............................................................................................................................................. 199
Adobe Photoshop CC
JavaScript Scripting Reference 29
BitmapConversionType............................................................................................................................................ 200
BitmapHalfToneType ................................................................................................................................................ 200
BitsPerChannelType................................................................................................................................................... 200
BlendMode.................................................................................................................................................................... 200
BMPDepthType ........................................................................................................................................................... 200
ByteOrder ...................................................................................................................................................................... 201
CameraRAWSettingsType........................................................................................................................................ 201
CameraRAWSize.......................................................................................................................................................... 201
ChangeMode................................................................................................................................................................ 201
ChannelType ................................................................................................................................................................ 201
ColorBlendMode......................................................................................................................................................... 202
ColorModel ................................................................................................................................................................... 202
ColorPicker.................................................................................................................................................................... 202
ColorProfileType ......................................................................................................................................................... 202
ColorReductionType.................................................................................................................................................. 202
ColorSpaceType .......................................................................................................................................................... 202
CopyrightedType........................................................................................................................................................ 202
CreateFields .................................................................................................................................................................. 203
CropToType .................................................................................................................................................................. 203
DCSType......................................................................................................................................................................... 203
DepthMapSource ....................................................................................................................................................... 203
DescValueType ............................................................................................................................................................ 203
DialogModes ................................................................................................................................................................ 203
Direction ........................................................................................................................................................................ 203
DisplacementMapType ............................................................................................................................................ 204
Dither .............................................................................................................................................................................. 204
DocPositionStyle......................................................................................................................................................... 204
DocumentFill................................................................................................................................................................ 204
DocumentMode.......................................................................................................................................................... 204
EditLogItemsType....................................................................................................................................................... 204
ElementPlacement..................................................................................................................................................... 204
EliminateFields ............................................................................................................................................................ 204
ExportType.................................................................................................................................................................... 204
Extension ....................................................................................................................................................................... 204
FileNamingType.......................................................................................................................................................... 205
FontPreviewType........................................................................................................................................................ 205
FontSize.......................................................................................................................................................................... 205
ForcedColors ................................................................................................................................................................ 205
FormatOptions ............................................................................................................................................................ 205
GalleryConstrainType................................................................................................................................................ 205
GalleryFontType.......................................................................................................................................................... 206
GallerySecurityTextColorType ............................................................................................................................... 206
GallerySecurityTextPositionType.......................................................................................................................... 206
GallerySecurityTextRotateType............................................................................................................................. 206
GallerySecurityType................................................................................................................................................... 206
GalleryThumbSizeType............................................................................................................................................. 206
Geometry....................................................................................................................................................................... 206
GridLineStyle................................................................................................................................................................ 206
GridSize .......................................................................................................................................................................... 206
GuideLineStyle............................................................................................................................................................. 207
IllustratorPathType............................................................................................................
......................................... 207
Adobe Photoshop CC
JavaScript Scripting Reference 30
Intent............................................................................................................................................................................... 207
Justification................................................................................................................................................................... 207
Language....................................................................................................................................................................... 207
LayerCompression...................................................................................................................................................... 207
LayerKind....................................................................................................................................................................... 208
LensType........................................................................................................................................................................ 208
MagnificationType ..................................................................................................................................................... 208
MatteType ..................................................................................................................................................................... 208
MeasurementRange .................................................................................................................................................. 208
MeasurementSource ................................................................................................................................................. 208
NewDocumentMode................................................................................................................................................. 208
NoiseDistribution........................................................................................................................................................ 209
OffsetUndefinedAreas .............................................................................................................................................. 209
OpenDocumentMode............................................................................................................................................... 209
OpenDocumentType................................................................................................................................................. 209
OperatingSystem........................................................................................................................................................ 209
Orientation.................................................................................................................................................................... 209
OtherPaintingCursors ............................................................................................................................................... 210
PaintingCursors........................................................................................................................................................... 210
PaletteType................................................................................................................................................................... 210
PathKind......................................................................................................................................................................... 210
PDFCompatibility........................................................................................................................................................ 210
PDFEncoding................................................................................................................................................................ 210
PDFResample ............................................................................................................................................................... 211
PDFStandard ................................................................................................................................................................ 211
PhotoCDColorSpace.................................................................................................................................................. 211
PhotoCDSize................................................................................................................................................................. 211
PICTBitsPerPixels......................................................................................................................................................... 211
PICTCompression........................................................................................................................................................ 211
PicturePackageTextType.......................................................................................................................................... 211
PointKind ....................................................................................................................................................................... 212
PointType ...................................................................................................................................................................... 212
PolarConversionType................................................................................................................................................ 212
Preview........................................................................................................................................................................... 212
PrintColorHandling.................................................................................................................................................... 212
PurgeTarget.................................................................................................................................................................. 212
QueryStateType........................................................................................................................................................... 212
RadialBlurMethod....................................................................................................................................................... 212
RadialBlurQuality ........................................................................................................................................................ 212
RasterizeType............................................................................................................................................................... 212
ReferenceFormType .................................................................................................................................................. 212
ResampleMethod ....................................................................................................................................................... 213
RippleSize ...................................................................................................................................................................... 213
SaveBehavior................................................................................................................................................................ 213
SaveDocumentType .................................................................................................................................................. 213
SaveEncoding .............................................................................................................................................................. 213
SaveLogItemsType..................................................................................................................................................... 213
SaveOptions ................................................................................................................................................................. 213
SelectionType............................................................................................................................................................... 214
ShapeOperation.......................................................................................................................................................... 214
SmartBlurMode ..................................................................................................................
......................................... 214