Macromedia Photoshop - CS4 User Guide

ADOBE PHOTOSHOP CS4
JAVASCRIPT SCRIPTING REFERENCE
Revision 1
bbc
© 2008 Adobe Systems Incorporated. All rights reserved.
Adobe® Creative Suite® 4 Photoshop
®
JavaScript Scripting Reference for Windows® and Macintosh®.
NOTICE: All information contained herein is the property of Adobe Systems Incorporated. No part of this publication (whether in hardcopy or electronic form) may be reproduced or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written consent of Adobe Systems Incorporated. The software described in this document is furnished under license and may only be used or copied in accordance with the terms of such license.
This publication and the information herein is furnished AS IS, is subject to change without notice, and should not be construed as a commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies, makes no warranty of any kind (express, implied, or statutory) with respect to this publication, and expressly disclaims any and all warranties of merchantability, fitness for particular purposes, and noninfringement of third party rights.
Any references to company names in sample templates are for demonstration purposes only and are not intended to refer to any actual organization.
®
, the Adobe logo, Acrobat®, GoLive®,InDesign®, Illustrator®, Photoshop® are either registered trademarks or trademarks of Adobe
Adobe Systems Incorporated in the United States and/or other countries.
Apple®, Mac OS®, and Macintosh® are trademarks of Apple Computer, Inc., registered in the United States and other countries. Microsoft®, and Windows all Java-related marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. UNIX
®.
are either registered trademarks or trademarks of Microsoft Corporation in the United States and other countries. JavaScriptTM and
®
is a
registered trademark of The Open Group.
All other trademarks are the property of their respective owners.
If this guide is distributed with software that includes an end user agreement, this guide, as well as the software described in it, is furnished under license and may be used or copied only in accordance with the terms of such license. Except as permitted by any such license, no part of this guide may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written permission of Adobe Systems Incorporated. Please note that the content in this guide is protected under copyright law even if it is not distributed with software that includes an end user license agreement.
The content of this guide is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies that may appear in the informational content contained in this guide.
Adobe Systems Incorporated, 345 Park Avenue, San Jose, California 95110, USA.
Contents
1 Introduction ............................................................................................................................... 33
JavaScript support in Adobe Photoshop CS4 ....................................................................................................................33
Executing scripts ....................................................................................................................................................................34
Installing scripts ...............................................................................................................................................................34
Executing other scripts..................................................................................................................................................34
Startup scripts .........................................................................................................................................................................34
Object model usage and naming...........................................................................................................................................35
Changes since earlier versions - CS4 changes ...................................................................................................................35
.............................................................................................................................................................................................................36
2 JavaScript Object Reference ..................................................................................................... 37
Object descriptions......................................................................................................................................................................37
Properties notation ...............................................................................................................................................................37
displayDialogs.................................................................................................................................................................37
Methods notation ..................................................................................................................................................................37
crop.....................................................................................................................................................................................38
ActionDescriptor ..........................................................................................................................................................................39
Properties..................................................................................................................................................................................39
count ..................................................................................................................................................................................39
typename .........................................................................................................................................................................39
Methods ....................................................................................................................................................................................39
clear ....................................................................................................................................................................................39
erase ...................................................................................................................................................................................39
fromStream......................................................................................................................................................................39
getBoolean.......................................................................................................................................................................39
getClass .............................................................................................................................................................................39
getData..............................................................................................................................................................................39
getDouble ........................................................................................................................................................................39
getEnumerationType ...................................................................................................................................................39
getEnumerationValue..................................................................................................................................................39
getInteger.........................................................................................................................................................................39
getKey................................................................................................................................................................................39
getList ................................................................................................................................................................................40
getObjectType................................................................................................................................................................40
getObjectValue...............................................................................................................................................................40
getPath ..............................................................................................................................................................................40
getReference ...................................................................................................................................................................40
getString ...........................................................................................................................................................................40
getType .............................................................................................................................................................................40
getUnitDoubleType ......................................................................................................................................................40
getUnitDoubleValue.....................................................................................................................................................40
hasKey................................................................................................................................................................................40
isEqual................................................................................................................................................................................40
putBoolean ......................................................................................................................................................................40
putClass.............................................................................................................................................................................40
putData .............................................................................................................................................................................40
3
Adobe Photoshop CS4
JavaScript Scripting Reference 4
putDouble ........................................................................................................................................................................40
putEnumerated ..............................................................................................................................................................40
putInteger ........................................................................................................................................................................40
putList ................................................................................................................................................................................41
putObject..........................................................................................................................................................................41
putPath..............................................................................................................................................................................41
putReference...................................................................................................................................................................41
putString...........................................................................................................................................................................41
putUnitDouble................................................................................................................................................................41
toStream ...........................................................................................................................................................................41
ActionList.........................................................................................................................................................................................42
Properties..................................................................................................................................................................................42
count ..................................................................................................................................................................................42
typename .........................................................................................................................................................................42
Methods ....................................................................................................................................................................................42
clear ....................................................................................................................................................................................42
getBoolean.......................................................................................................................................................................42
getClass .............................................................................................................................................................................42
getData..............................................................................................................................................................................42
getDouble ........................................................................................................................................................................42
getEnumerationType ...................................................................................................................................................42
getEnumerationValue..................................................................................................................................................42
getInteger.........................................................................................................................................................................42
getList ................................................................................................................................................................................43
getObjectType................................................................................................................................................................43
getObjectValue...............................................................................................................................................................43
getPath ..............................................................................................................................................................................43
getReference ...................................................................................................................................................................43
getString ...........................................................................................................................................................................43
getType .............................................................................................................................................................................43
getUnitDoubleType ......................................................................................................................................................43
getUnitDoubleValue.....................................................................................................................................................43
putBoolean ......................................................................................................................................................................43
putClass.............................................................................................................................................................................43
putData .............................................................................................................................................................................43
putDouble ........................................................................................................................................................................43
putEnumerated ..............................................................................................................................................................43
putInteger ........................................................................................................................................................................43
putList ................................................................................................................................................................................43
putObject..........................................................................................................................................................................43
putPath..............................................................................................................................................................................43
putReference...................................................................................................................................................................43
putString...........................................................................................................................................................................44
putUnitDouble................................................................................................................................................................44
ActionReference ...........................................................................................................................................................................45
Properties..................................................................................................................................................................................45
typename .........................................................................................................................................................................45
Methods ....................................................................................................................................................................................45
getContainer ...................................................................................................................................................................45
getDesiredClass..............................................................................................................................................................45
getEnumeratedType..............................................................................................................
.......................................45
Adobe Photoshop CS4
JavaScript Scripting Reference 5
getEnumeratedValue ...................................................................................................................................................45
getForm.............................................................................................................................................................................45
getIdentifier.....................................................................................................................................................................45
getIndex............................................................................................................................................................................45
getName ...........................................................................................................................................................................45
getOffset ...........................................................................................................................................................................45
getProperty......................................................................................................................................................................45
putClass.............................................................................................................................................................................46
putEnumerated ..............................................................................................................................................................46
putIdentifier.....................................................................................................................................................................46
putIndex............................................................................................................................................................................46
putName ...........................................................................................................................................................................46
putOffset...........................................................................................................................................................................46
putProperty......................................................................................................................................................................46
Application .....................................................................................................................................................................................47
Properties..................................................................................................................................................................................47
activeDocument.............................................................................................................................................................47
backgroundColor...........................................................................................................................................................47
build....................................................................................................................................................................................47
colorSettings ...................................................................................................................................................................47
displayDialogs.................................................................................................................................................................47
documents .......................................................................................................................................................................47
fonts....................................................................................................................................................................................47
foregroundColor ............................................................................................................................................................47
freeMemory .....................................................................................................................................................................47
locale ..................................................................................................................................................................................48
macintoshFileTypes......................................................................................................................................................48
measurementLog ..........................................................................................................................................................48
name...................................................................................................................................................................................48
notifiers .............................................................................................................................................................................48
notifiersEnabled .............................................................................................................................................................48
path.....................................................................................................................................................................................48
playbackDisplayDialogs ..............................................................................................................................................48
playbackParameters .....................................................................................................................................................48
preferences ......................................................................................................................................................................48
preferencesFolder .........................................................................................................................................................48
recentFiles ........................................................................................................................................................................48
scriptingBuildDate ........................................................................................................................................................48
scriptingVersion .............................................................................................................................................................48
systemInformation........................................................................................................................................................48
typename .........................................................................................................................................................................48
version ...............................................................................................................................................................................49
windowsFileTypes.........................................................................................................................................................49
Methods ....................................................................................................................................................................................49
batch ..................................................................................................................................................................................49
beep....................................................................................................................................................................................49
bringToFront ...................................................................................................................................................................49
charIDToTypeID..............................................................................................................................................................49
doAction ...........................................................................................................................................................................49
eraseCustomOptions....................................................................................................................................................49
executeAction..................................................................................................................
...............................................49
Adobe Photoshop CS4
JavaScript Scripting Reference 6
executeActionGet..........................................................................................................................................................49
featureEnabled ...............................................................................................................................................................49
getCustomOptions........................................................................................................................................................50
load .....................................................................................................................................................................................50
makeContactSheet........................................................................................................................................................50
makePDFPresentation .................................................................................................................................................50
makePhotoGallery.........................................................................................................................................................50
makePhotomerge..........................................................................................................................................................50
makePicturePackage....................................................................................................................................................50
open ...................................................................................................................................................................................51
openDialog ......................................................................................................................................................................51
purge..................................................................................................................................................................................51
putCustomOptions .......................................................................................................................................................51
refresh................................................................................................................................................................................51
runMenuItem ..................................................................................................................................................................51
stringIDToTypeID...........................................................................................................................................................51
togglePalettes.................................................................................................................................................................52
typeIDToCharID..............................................................................................................................................................52
typeIDToStringID ...........................................................................................................................................................52
ArtLayer............................................................................................................................................................................................54
Properties..................................................................................................................................................................................54
allLocked...........................................................................................................................................................................54
blendMode.......................................................................................................................................................................54
bounds...............................................................................................................................................................................54
fillOpacity..........................................................................................................................................................................54
filterMaskDensity ...........................................................................................................................................................54
filterMaskFeather...........................................................................................................................................................54
grouped ............................................................................................................................................................................54
isBackgroundLayer........................................................................................................................................................54
kind .....................................................................................................................................................................................54
layerMaskDensity...........................................................................................................................................................54
layerMaskFeather ..........................................................................................................................................................55
linkedLayers.....................................................................................................................................................................55
name...................................................................................................................................................................................55
opacity ...............................................................................................................................................................................55
parent.................................................................................................................................................................................55
pixelsLocked....................................................................................................................................................................55
positionLocked...............................................................................................................................................................55
textItem.............................................................................................................................................................................55
transparentPixelsLocked.............................................................................................................................................55
typename .........................................................................................................................................................................55
vectorMaskDensity........................................................................................................................................................55
vectorMaskFeather .......................................................................................................................................................55
visible .................................................................................................................................................................................55
xmpMetadata..................................................................................................................................................................55
Methods ....................................................................................................................................................................................56
adjustBrightnessContrast ...........................................................................................................................................56
adjustColorBalance .......................................................................................................................................................56
adjustCurves....................................................................................................................................................................56
adjustLevels .....................................................................................................................................................................56
applyAddNoise..................................................................................................................
.............................................56
Adobe Photoshop CS4
JavaScript Scripting Reference 7
applyAverage..................................................................................................................................................................56
applyBlur...........................................................................................................................................................................56
applyBlurMore ................................................................................................................................................................56
applyClouds.....................................................................................................................................................................56
applyCustomFilter.........................................................................................................................................................56
applyDeInterlace............................................................................................................................................................57
applyDespeckle..............................................................................................................................................................57
applyDifferenceClouds................................................................................................................................................57
applyDiffuseGlow ..........................................................................................................................................................57
applyDisplace..................................................................................................................................................................57
applyDustAndScratches..............................................................................................................................................57
applyGaussianBlur.........................................................................................................................................................57
applyGlassEffect.............................................................................................................................................................57
applyHighPass ................................................................................................................................................................57
applyLensBlur .................................................................................................................................................................58
applyLensFlare................................................................................................................................................................58
applyMaximum ..............................................................................................................................................................58
applyMedianNoise ........................................................................................................................................................58
applyMinimum ...............................................................................................................................................................59
applyMotionBlur ............................................................................................................................................................59
applyNTSC........................................................................................................................................................................59
applyOceanRipple.........................................................................................................................................................59
applyOffset.......................................................................................................................................................................59
applyPinch .......................................................................................................................................................................59
applyPolarCoordinates................................................................................................................................................59
applyRadialBlur ..............................................................................................................................................................59
applyRipple......................................................................................................................................................................59
applySharpen..................................................................................................................................................................59
applySharpenEdges......................................................................................................................................................59
applySharpenMore .......................................................................................................................................................59
applyShear .......................................................................................................................................................................59
applySmartBlur...............................................................................................................................................................60
applySpherize .................................................................................................................................................................60
applyStyle.........................................................................................................................................................................60
applyTextureFill..............................................................................................................................................................60
applyTwirl.........................................................................................................................................................................60
applyUnSharpMask.......................................................................................................................................................60
applyWave........................................................................................................................................................................60
applyZigZag.....................................................................................................................................................................60
autoContrast....................................................................................................................................................................60
autoLevels ........................................................................................................................................................................60
clear ....................................................................................................................................................................................60
copy ....................................................................................................................................................................................61
cut........................................................................................................................................................................................61
desaturate ........................................................................................................................................................................61
duplicate ...........................................................................................................................................................................61
equalize .............................................................................................................................................................................61
invert ..................................................................................................................................................................................61
link.......................................................................................................................................................................................61
merge.................................................................................................................................................................................61
mixChannels....................................................................................................................
................................................62
Adobe Photoshop CS4
JavaScript Scripting Reference 8
move...................................................................................................................................................................................62
photoFilter .......................................................................................................................................................................62
posterize ...........................................................................................................................................................................62
rasterize.............................................................................................................................................................................62
remove...............................................................................................................................................................................62
resize ..................................................................................................................................................................................63
rotate..................................................................................................................................................................................63
selectiveColor..................................................................................................................................................................63
shadowHighlight ...........................................................................................................................................................63
threshold...........................................................................................................................................................................63
translate ............................................................................................................................................................................63
unlink .................................................................................................................................................................................63
ArtLayers..........................................................................................................................................................................................66
Properties..................................................................................................................................................................................66
length.................................................................................................................................................................................66
parent.................................................................................................................................................................................66
typename .........................................................................................................................................................................66
Methods ....................................................................................................................................................................................66
add ......................................................................................................................................................................................66
getByName ......................................................................................................................................................................66
removeAll .........................................................................................................................................................................66
BatchOptions .................................................................................................................................................................................67
Properties..................................................................................................................................................................................67
destination .......................................................................................................................................................................67
destinationFolder ..........................................................................................................................................................67
errorFile .............................................................................................................................................................................67
fileNaming........................................................................................................................................................................67
macintoshCompatible .................................................................................................................................................67
overrideOpen..................................................................................................................................................................67
overrideSave....................................................................................................................................................................67
startingSerial ...................................................................................................................................................................67
suppressOpen.................................................................................................................................................................67
suppressProfile ...............................................................................................................................................................68
typename .........................................................................................................................................................................68
unixCompatible..............................................................................................................................................................68
windowsCompatible ....................................................................................................................................................68
BitmapConversionOptions .......................................................................................................................................................69
Properties..................................................................................................................................................................................69
angle...................................................................................................................................................................................69
frequency..........................................................................................................................................................................69
method..............................................................................................................................................................................69
patternName ...................................................................................................................................................................69
resolution..........................................................................................................................................................................69
shape..................................................................................................................................................................................69
typename .........................................................................................................................................................................69
BMPSaveOptions ..........................................................................................................................................................................70
Properties..................................................................................................................................................................................70
alphaChannels................................................................................................................................................................70
depth..................................................................................................................................................................................70
flipRowOrder ...................................................................................................................................................................70
osType.........................................................................................................................
.......................................................70
Adobe Photoshop CS4
JavaScript Scripting Reference 9
rleCompression ..............................................................................................................................................................70
typename .........................................................................................................................................................................70
CameraRAWOpenOptions ........................................................................................................................................................71
Properties..................................................................................................................................................................................71
bitsPerChannel ...............................................................................................................................................................71
blueHue.............................................................................................................................................................................71
blueSaturation ................................................................................................................................................................71
brightness.........................................................................................................................................................................71
chromaticAberrationBY...............................................................................................................................................71
chromaticAberrationRC...............................................................................................................................................71
colorNoiseReduction....................................................................................................................................................71
colorSpace........................................................................................................................................................................71
contrast .............................................................................................................................................................................71
exposure ...........................................................................................................................................................................71
greenHue..........................................................................................................................................................................71
greenSaturation .............................................................................................................................................................71
luminanceSmoothing ..................................................................................................................................................71
redHue...............................................................................................................................................................................71
redSaturation ..................................................................................................................................................................71
resolution..........................................................................................................................................................................71
saturation .........................................................................................................................................................................71
settings..............................................................................................................................................................................71
shadows ............................................................................................................................................................................71
shadowTint ......................................................................................................................................................................71
sharpness..........................................................................................................................................................................71
size ......................................................................................................................................................................................71
temperature.....................................................................................................................................................................71
tint.......................................................................................................................................................................................72
typename .........................................................................................................................................................................72
vignettingAmount ........................................................................................................................................................72
vignettingMidpoint ......................................................................................................................................................72
whiteBalance...................................................................................................................................................................72
Channel............................................................................................................................................................................................73
Properties..................................................................................................................................................................................73
color....................................................................................................................................................................................73
histogram .........................................................................................................................................................................73
kind .....................................................................................................................................................................................73
name...................................................................................................................................................................................73
opacity ...............................................................................................................................................................................73
parent.................................................................................................................................................................................73
typename .........................................................................................................................................................................73
visible .................................................................................................................................................................................73
Methods ....................................................................................................................................................................................73
duplicate ...........................................................................................................................................................................73
merge.................................................................................................................................................................................74
remove...............................................................................................................................................................................74
Channels..........................................................................................................................................................................................75
Properties..................................................................................................................................................................................75
length.................................................................................................................................................................................75
parent.................................................................................................................................................................................75
typename .......................................................................................................................
..................................................75
Adobe Photoshop CS4
JavaScript Scripting Reference 10
Methods ....................................................................................................................................................................................75
add ......................................................................................................................................................................................75
getByName ......................................................................................................................................................................75
removeAll .........................................................................................................................................................................75
CMYKColor......................................................................................................................................................................................80
Properties..................................................................................................................................................................................80
black ...................................................................................................................................................................................80
cyan.....................................................................................................................................................................................80
magenta............................................................................................................................................................................80
typename .........................................................................................................................................................................80
yellow.................................................................................................................................................................................80
ColorSampler .................................................................................................................................................................................81
Properties..................................................................................................................................................................................81
color....................................................................................................................................................................................81
position .............................................................................................................................................................................81
parent.................................................................................................................................................................................81
typename .........................................................................................................................................................................81
Methods ....................................................................................................................................................................................81
move...................................................................................................................................................................................81
remove...............................................................................................................................................................................81
ColorSamplers ...............................................................................................................................................................................82
Properties..................................................................................................................................................................................82
length.................................................................................................................................................................................82
parent.................................................................................................................................................................................82
typename .........................................................................................................................................................................82
Methods ....................................................................................................................................................................................82
add ......................................................................................................................................................................................82
removeAll .........................................................................................................................................................................82
ContactSheetOptions .................................................................................................................................................................83
Properties..................................................................................................................................................................................83
acrossFirst.........................................................................................................................................................................83
bestFit ................................................................................................................................................................................83
caption...............................................................................................................................................................................83
columnCount ..................................................................................................................................................................83
flatten.................................................................................................................................................................................83
font......................................................................................................................................................................................83
fontSize..............................................................................................................................................................................83
height.................................................................................................................................................................................83
horizontal .........................................................................................................................................................................83
mode ..................................................................................................................................................................................83
resolution..........................................................................................................................................................................83
rowCount..........................................................................................................................................................................83
typename .........................................................................................................................................................................83
useAutoSpacing.............................................................................................................................................................83
vertical ...............................................................................................................................................................................83
width ..................................................................................................................................................................................83
CountItem .......................................................................................................................................................................................84
Properties..................................................................................................................................................................................84
position .............................................................................................................................................................................84
parent.................................................................................................................................................................................84
typename .......................................................................................................................
..................................................84
Adobe Photoshop CS4
JavaScript Scripting Reference 11
Methods ....................................................................................................................................................................................84
remove...............................................................................................................................................................................84
CountItems .....................................................................................................................................................................................85
Properties..................................................................................................................................................................................85
length.................................................................................................................................................................................85
parent.................................................................................................................................................................................85
typename .........................................................................................................................................................................85
Methods ....................................................................................................................................................................................85
add ......................................................................................................................................................................................85
getByName ......................................................................................................................................................................85
removeAll .........................................................................................................................................................................85
DCS1_SaveOptions......................................................................................................................................................................86
Properties..................................................................................................................................................................................86
dCS......................................................................................................................................................................................86
embedColorProfile........................................................................................................................................................86
encoding...........................................................................................................................................................................86
halftoneScreen ...............................................................................................................................................................86
interpolation....................................................................................................................................................................86
preview..............................................................................................................................................................................86
transferFunction.............................................................................................................................................................86
typename .........................................................................................................................................................................86
vectorData........................................................................................................................................................................86
DCS2_SaveOptions......................................................................................................................................................................87
Properties..................................................................................................................................................................................87
dCS......................................................................................................................................................................................87
embedColorProfile........................................................................................................................................................87
encoding...........................................................................................................................................................................87
halftoneScreen ...............................................................................................................................................................87
interpolation....................................................................................................................................................................87
multiFileDCS....................................................................................................................................................................87
preview..............................................................................................................................................................................87
spotColors ........................................................................................................................................................................87
transferFunction.............................................................................................................................................................87
typename .........................................................................................................................................................................87
vectorData........................................................................................................................................................................87
DICOMOpenOptions ...................................................................................................................................................................88
Properties..................................................................................................................................................................................88
anonymize........................................................................................................................................................................88
columns.............................................................................................................................................................................88
reverse ...............................................................................................................................................................................88
rows ....................................................................................................................................................................................88
showOverlays..................................................................................................................................................................88
typename .........................................................................................................................................................................88
windowLevel ...................................................................................................................................................................88
windowWidth .................................................................................................................................................................88
Document .......................................................................................................................................................................................89
Properties..................................................................................................................................................................................89
activeChannels ...............................................................................................................................................................89
activeHistoryBrushSource ..........................................................................................................................................89
activeHistoryState .........................................................................................................................................................89
activeLayer ....................................................................................................................
...................................................89
Adobe Photoshop CS4
JavaScript Scripting Reference 12
artLayers............................................................................................................................................................................89
backgroundLayer...........................................................................................................................................................89
bitsPerChannel ...............................................................................................................................................................89
channels............................................................................................................................................................................89
colorProfileName...........................................................................................................................................................89
colorProfileType .............................................................................................................................................................89
colorSamplers .................................................................................................................................................................89
componentChannels....................................................................................................................................................89
countItems .......................................................................................................................................................................90
fullName............................................................................................................................................................................90
height.................................................................................................................................................................................90
histogram .........................................................................................................................................................................90
historyStates....................................................................................................................................................................90
info ......................................................................................................................................................................................90
layerComps ......................................................................................................................................................................90
layers ..................................................................................................................................................................................90
layerSets............................................................................................................................................................................90
managed...........................................................................................................................................................................90
measurementScale .......................................................................................................................................................90
mode ..................................................................................................................................................................................90
name...................................................................................................................................................................................90
parent.................................................................................................................................................................................90
path.....................................................................................................................................................................................90
pathItems .........................................................................................................................................................................90
pixelAspectRatio ............................................................................................................................................................90
printSettings....................................................................................................................................................................90
quickMaskMode .............................................................................................................................................................90
resolution..........................................................................................................................................................................91
saved ..................................................................................................................................................................................91
selection............................................................................................................................................................................91
typename .........................................................................................................................................................................91
width ..................................................................................................................................................................................91
xmpMetadata..................................................................................................................................................................91
Methods ....................................................................................................................................................................................92
autoCount ........................................................................................................................................................................92
changeMode ...................................................................................................................................................................92
close....................................................................................................................................................................................92
convertProfile..................................................................................................................................................................92
crop.....................................................................................................................................................................................92
duplicate ...........................................................................................................................................................................92
exportDocument ...........................................................................................................................................................93
flatten.................................................................................................................................................................................93
flipCanvas .........................................................................................................................................................................93
importAnnotations .......................................................................................................................................................93
mergeVisibleLayers.......................................................................................................................................................93
paste...................................................................................................................................................................................93
print ....................................................................................................................................................................................93
printOneCopy .................................................................................................................................................................93
rasterizeAllLayers...........................................................................................................................................................93
recordMeasurements...................................................................................................................................................93
resizeCanvas...................................................................................................................
.................................................93
Adobe Photoshop CS4
JavaScript Scripting Reference 13
resizeImage......................................................................................................................................................................93
revealAll.............................................................................................................................................................................94
rotateCanvas ...................................................................................................................................................................94
save.....................................................................................................................................................................................94
saveAs ................................................................................................................................................................................94
splitChannels...................................................................................................................................................................94
suspendHistory...............................................................................................................................................................94
trap......................................................................................................................................................................................94
trim......................................................................................................................................................................................94
DocumentPrintSettings .............................................................................................................................................................97
Properties..................................................................................................................................................................................97
backgroundColor...........................................................................................................................................................97
bleedWidth ......................................................................................................................................................................97
caption...............................................................................................................................................................................97
centerCropMarks ...........................................................................................................................................................97
colorBars ...........................................................................................................................................................................97
copies.................................................................................................................................................................................97
cornerCropMarks ...........................................................................................................................................................97
colorHandling .................................................................................................................................................................97
activePrinter ....................................................................................................................................................................97
flip........................................................................................................................................................................................97
hardProof..........................................................................................................................................................................97
interpolate........................................................................................................................................................................97
labels ..................................................................................................................................................................................97
mapBlack ..........................................................................................................................................................................97
negative ............................................................................................................................................................................97
renderIntent ....................................................................................................................................................................97
posX....................................................................................................................................................................................97
posY....................................................................................................................................................................................97
printBorder.......................................................................................................................................................................97
printSelected...................................................................................................................................................................97
printSpace ........................................................................................................................................................................97
registrationMarks...........................................................................................................................................................98
scale....................................................................................................................................................................................98
vectorData........................................................................................................................................................................98
Methods ....................................................................................................................................................................................99
setPagePosition..............................................................................................................................................................99
DocumentInfo ............................................................................................................................................................................ 100
Properties............................................................................................................................................................................... 100
author ............................................................................................................................................................................. 100
authorPosition ............................................................................................................................................................. 100
caption............................................................................................................................................................................ 100
captionWriter ............................................................................................................................................................... 100
category ......................................................................................................................................................................... 100
city.................................................................................................................................................................................... 100
copyrighted .................................................................................................................................................................. 100
copyrightNotice .......................................................................................................................................................... 100
country ........................................................................................................................................................................... 100
creationDate................................................................................................................................................................. 100
credit ............................................................................................................................................................................... 100
exif...........................................................................................................................
......................................................... 100
Adobe Photoshop CS4
JavaScript Scripting Reference 14
headline ......................................................................................................................................................................... 100
instructions ................................................................................................................................................................... 100
jobName ........................................................................................................................................................................ 100
keywords........................................................................................................................................................................ 100
ownerUrl ........................................................................................................................................................................ 100
parent.............................................................................................................................................................................. 101
provinceState............................................................................................................................................................... 101
source.............................................................................................................................................................................. 101
supplementalCategories.......................................................................................................................................... 101
title ................................................................................................................................................................................... 101
transmissionReference ............................................................................................................................................. 101
typename ...................................................................................................................................................................... 101
urgency .......................................................................................................................................................................... 101
Documents .................................................................................................................................................................................. 103
Properties............................................................................................................................................................................... 103
length.............................................................................................................................................................................. 103
parent.............................................................................................................................................................................. 103
typename ...................................................................................................................................................................... 103
Methods ................................................................................................................................................................................. 103
add ................................................................................................................................................................................... 103
getByName ................................................................................................................................................................... 103
EPSOpenOptions ....................................................................................................................................................................... 104
Properties............................................................................................................................................................................... 104
antiAlias.......................................................................................................................................................................... 104
constrainProportions ................................................................................................................................................ 104
height.............................................................................................................................................................................. 104
mode ............................................................................................................................................................................... 104
resolution....................................................................................................................................................................... 104
typename ...................................................................................................................................................................... 104
width ............................................................................................................................................................................... 104
EPSSaveOptions......................................................................................................................................................................... 105
Properties............................................................................................................................................................................... 105
embedColorProfile..................................................................................................................................................... 105
encoding........................................................................................................................................................................ 105
halftoneScreen ............................................................................................................................................................ 105
interpolation................................................................................................................................................................. 105
preview........................................................................................................................................................................... 105
psColorManagement ................................................................................................................................................ 105
transferFunction.......................................................................................................................................................... 105
transparentWhites...................................................................................................................................................... 105
typename ...................................................................................................................................................................... 105
vectorData..................................................................................................................................................................... 105
ExportOptionsIllustrator ......................................................................................................................................................... 106
Properties............................................................................................................................................................................... 106
path.................................................................................................................................................................................. 106
pathName...................................................................................................................................................................... 106
typename ...................................................................................................................................................................... 106
ExportOptionsSaveForWeb ................................................................................................................................................... 107
Properties............................................................................................................................................................................... 107
blur................................................................................................................................................................................... 107
colorReduction .................................................................................................................
........................................... 107
Adobe Photoshop CS4
JavaScript Scripting Reference 15
colors............................................................................................................................................................................... 107
dither............................................................................................................................................................................... 107
ditherAmount .............................................................................................................................................................. 107
format ............................................................................................................................................................................. 107
includeProfile ............................................................................................................................................................... 107
interlaced....................................................................................................................................................................... 107
lossy ................................................................................................................................................................................. 107
matteColor .................................................................................................................................................................... 107
optimized ...................................................................................................................................................................... 107
PNG8................................................................................................................................................................................ 107
quality ............................................................................................................................................................................. 108
transparency................................................................................................................................................................. 108
transparencyAmount ................................................................................................................................................ 108
transparencyDither .................................................................................................................................................... 108
typename ...................................................................................................................................................................... 108
webSnap ........................................................................................................................................................................ 108
File................................................................................................................................................................................................... 109
Folder............................................................................................................................................................................................. 109
GalleryBannerOptions ............................................................................................................................................................. 110
Properties............................................................................................................................................................................... 110
contactInfo.................................................................................................................................................................... 110
date.................................................................................................................................................................................. 110
font................................................................................................................................................................................... 110
fontSize........................................................................................................................................................................... 110
photographer............................................................................................................................................................... 110
siteName........................................................................................................................................................................ 110
typename ...................................................................................................................................................................... 110
GalleryCustomColorOptions ................................................................................................................................................. 111
Properties............................................................................................................................................................................... 111
activeLinkColor............................................................................................................................................................ 111
backgroundColor........................................................................................................................................................ 111
bannerColor.................................................................................................................................................................. 111
linkColor......................................................................................................................................................................... 111
textColor ........................................................................................................................................................................ 111
typename ...................................................................................................................................................................... 111
visitedLinkColor........................................................................................................................................................... 111
GalleryImagesOptions ............................................................................................................................................................. 112
Properties............................................................................................................................................................................... 112
border ............................................................................................................................................................................. 112
caption............................................................................................................................................................................ 112
dimension...................................................................................................................................................................... 112
font................................................................................................................................................................................... 112
fontSize........................................................................................................................................................................... 112
imageQuality................................................................................................................................................................ 112
includeCopyright........................................................................................................................................................ 112
includeCredits.............................................................................................................................................................. 112
includeFilename.......................................................................................................................................................... 112
includeTitle ................................................................................................................................................................... 112
numericLinks................................................................................................................................................................ 112
resizeConstraint .......................................................................................................................................................... 113
resizeImages...................................................................................................................
.............................................. 113
Adobe Photoshop CS4
JavaScript Scripting Reference 16
typename ...................................................................................................................................................................... 113
GalleryOptions............................................................................................................................................................................ 114
Properties............................................................................................................................................................................... 114
addSizeAttributes ....................................................................................................................................................... 114
bannerOptions ............................................................................................................................................................ 114
customColorOptions ................................................................................................................................................. 114
emailAddress................................................................................................................................................................ 114
imagesOptions ............................................................................................................................................................ 114
includeSubFolders ..................................................................................................................................................... 114
layoutStyle .................................................................................................................................................................... 114
preserveAllMetadata ................................................................................................................................................. 114
securityOptions ........................................................................................................................................................... 114
thumbnailOptions...................................................................................................................................................... 114
typename ...................................................................................................................................................................... 114
useShortExtension ..................................................................................................................................................... 114
useUTF8Encoding ...................................................................................................................................................... 114
GallerySecurityOptions ........................................................................................................................................................... 115
Properties............................................................................................................................................................................... 115
content ........................................................................................................................................................................... 115
font................................................................................................................................................................................... 115
fontSize........................................................................................................................................................................... 115
opacity ............................................................................................................................................................................ 115
text ................................................................................................................................................................................... 115
textColor ........................................................................................................................................................................ 115
textPosition................................................................................................................................................................... 115
textRotate...................................................................................................................................................................... 115
typename ...................................................................................................................................................................... 115
GalleryThumbnailOptions...................................................................................................................................................... 116
Properties............................................................................................................................................................................... 116
border ............................................................................................................................................................................. 116
caption............................................................................................................................................................................ 116
columnCount ............................................................................................................................................................... 116
dimension...................................................................................................................................................................... 116
font................................................................................................................................................................................... 116
fontSize........................................................................................................................................................................... 116
includeCopyright........................................................................................................................................................ 116
includeCredits.............................................................................................................................................................. 116
includeFilename.......................................................................................................................................................... 116
includeTitle ................................................................................................................................................................... 116
rowCount....................................................................................................................................................................... 116
size ................................................................................................................................................................................... 116
typename ...................................................................................................................................................................... 116
GIFSaveOptions.......................................................................................................................................................................... 117
Properties............................................................................................................................................................................... 117
colors............................................................................................................................................................................... 117
dither............................................................................................................................................................................... 117
ditherAmount .............................................................................................................................................................. 117
forced.............................................................................................................................................................................. 117
interlaced....................................................................................................................................................................... 117
matte............................................................................................................................................................................... 117
palette........................................................................................................................
..................................................... 117
Adobe Photoshop CS4
JavaScript Scripting Reference 17
preserveExactColors .................................................................................................................................................. 117
transparency................................................................................................................................................................. 117
typename ...................................................................................................................................................................... 117
GrayColor...................................................................................................................................................................................... 118
Properties............................................................................................................................................................................... 118
gray .................................................................................................................................................................................. 118
typename ...................................................................................................................................................................... 118
HistoryState ................................................................................................................................................................................. 119
Properties............................................................................................................................................................................... 119
name................................................................................................................................................................................ 119
parent.............................................................................................................................................................................. 119
snapshot ........................................................................................................................................................................ 119
typename ...................................................................................................................................................................... 119
HistoryStates ............................................................................................................................................................................... 120
Properties............................................................................................................................................................................... 120
length.............................................................................................................................................................................. 120
parent.............................................................................................................................................................................. 120
typename ...................................................................................................................................................................... 120
Methods ................................................................................................................................................................................. 120
getByName ................................................................................................................................................................... 120
HSBColor....................................................................................................................................................................................... 121
Properties............................................................................................................................................................................... 121
brightness...................................................................................................................................................................... 121
hue ................................................................................................................................................................................... 121
saturation ...................................................................................................................................................................... 121
typename ...................................................................................................................................................................... 121
IndexedConversionOptions .................................................................................................................................................. 122
Properties............................................................................................................................................................................... 122
colors............................................................................................................................................................................... 122
dither............................................................................................................................................................................... 122
ditherAmount .............................................................................................................................................................. 122
forced.............................................................................................................................................................................. 122
matte............................................................................................................................................................................... 122
palette............................................................................................................................................................................. 122
preserveExactColors .................................................................................................................................................. 122
transparency................................................................................................................................................................. 122
typename ...................................................................................................................................................................... 122
JPEGSaveOptions ...................................................................................................................................................................... 123
Properties............................................................................................................................................................................... 123
embedColorProfile..................................................................................................................................................... 123
formatOptions ............................................................................................................................................................. 123
matte............................................................................................................................................................................... 123
quality ............................................................................................................................................................................. 123
scans................................................................................................................................................................................ 123
typename ...................................................................................................................................................................... 123
LabColor ....................................................................................................................................................................................... 124
Properties............................................................................................................................................................................... 124
a......................................................................................................................................................................................... 124
b ........................................................................................................................................................................................ 124
l.......................................................................................................................................................................................... 124
typename .......................................................................................................................
............................................... 124
Adobe Photoshop CS4
JavaScript Scripting Reference 18
LayerComp................................................................................................................................................................................... 125
Properties............................................................................................................................................................................... 125
appearance ................................................................................................................................................................... 125
comment ....................................................................................................................................................................... 125
name................................................................................................................................................................................ 125
parent.............................................................................................................................................................................. 125
position .......................................................................................................................................................................... 125
selected .......................................................................................................................................................................... 125
typename ...................................................................................................................................................................... 125
visibility .......................................................................................................................................................................... 125
Methods ................................................................................................................................................................................. 125
apply................................................................................................................................................................................ 125
recapture ....................................................................................................................................................................... 125
remove............................................................................................................................................................................ 125
resetfromComp ........................................................................................................................................................... 125
LayerComps................................................................................................................................................................................. 126
Properties............................................................................................................................................................................... 126
length.............................................................................................................................................................................. 126
parent.............................................................................................................................................................................. 126
typename ...................................................................................................................................................................... 126
Methods ................................................................................................................................................................................. 126
add ................................................................................................................................................................................... 126
getByName ................................................................................................................................................................... 126
removeAll ...................................................................................................................................................................... 126
Layers............................................................................................................................................................................................. 127
Properties............................................................................................................................................................................... 127
length.............................................................................................................................................................................. 127
parent.............................................................................................................................................................................. 127
typename ...................................................................................................................................................................... 127
Methods ................................................................................................................................................................................. 127
getByName ................................................................................................................................................................... 127
removeAll ...................................................................................................................................................................... 127
LayerSet ........................................................................................................................................................................................ 128
Properties............................................................................................................................................................................... 128
allLocked........................................................................................................................................................................ 128
artLayers......................................................................................................................................................................... 128
blendMode.................................................................................................................................................................... 128
bounds............................................................................................................................................................................ 128
enabledChannels........................................................................................................................................................ 128
layers ............................................................................................................................................................................... 128
layerSets......................................................................................................................................................................... 128
linkedLayers.................................................................................................................................................................. 128
name................................................................................................................................................................................ 128
opacity ............................................................................................................................................................................ 128
parent.............................................................................................................................................................................. 128
typename ...................................................................................................................................................................... 128
visible .............................................................................................................................................................................. 128
Methods ................................................................................................................................................................................. 129
duplicate ........................................................................................................................................................................ 129
link.................................................................................................................................................................................... 129
merge..........................................................................................................................
.................................................... 129
Adobe Photoshop CS4
JavaScript Scripting Reference 19
move................................................................................................................................................................................ 129
remove............................................................................................................................................................................ 129
resize ............................................................................................................................................................................... 129
rotate............................................................................................................................................................................... 129
translate ......................................................................................................................................................................... 129
unlink .............................................................................................................................................................................. 129
LayerSets ...................................................................................................................................................................................... 130
Properties............................................................................................................................................................................... 130
length.............................................................................................................................................................................. 130
parent.............................................................................................................................................................................. 130
typename ...................................................................................................................................................................... 130
Methods ................................................................................................................................................................................. 130
add ................................................................................................................................................................................... 130
getByName ................................................................................................................................................................... 130
removeAll ...................................................................................................................................................................... 130
MeasurementLog ...................................................................................................................................................................... 132
Methods ................................................................................................................................................................................. 132
exportMeasurements................................................................................................................................................ 132
deleteMeasurements ................................................................................................................................................ 132
MeasurementScale ................................................................................................................................................................... 133
Properties............................................................................................................................................................................... 133
pixelLength................................................................................................................................................................... 133
logicalLength ............................................................................................................................................................... 133
logicalUnits ................................................................................................................................................................... 133
NoColor......................................................................................................................................................................................... 134
Properties............................................................................................................................................................................... 134
typename ...................................................................................................................................................................... 134
Notifier........................................................................................................................................................................................... 135
Properties............................................................................................................................................................................... 135
event................................................................................................................................................................................ 135
eventClass ..................................................................................................................................................................... 135
eventFile ........................................................................................................................................................................ 135
parent.............................................................................................................................................................................. 135
typename ...................................................................................................................................................................... 135
Methods ................................................................................................................................................................................. 135
remove............................................................................................................................................................................ 135
Notifiers......................................................................................................................................................................................... 136
Properties............................................................................................................................................................................... 136
length.............................................................................................................................................................................. 136
parent.............................................................................................................................................................................. 136
typename ...................................................................................................................................................................... 136
Methods ................................................................................................................................................................................. 136
add ................................................................................................................................................................................... 136
removeAll ...................................................................................................................................................................... 136
PathItem ....................................................................................................................................................................................... 137
Properties............................................................................................................................................................................... 137
kind .................................................................................................................................................................................. 137
name................................................................................................................................................................................ 137
parent.............................................................................................................................................................................. 137
subPathItems ............................................................................................................................................................... 137
typename .......................................................................................................................
............................................... 137
Adobe Photoshop CS4
JavaScript Scripting Reference 20
Methods ................................................................................................................................................................................. 137
deselect .......................................................................................................................................................................... 137
duplicate ........................................................................................................................................................................ 137
fillPath............................................................................................................................................................................. 137
makeClippingPath...................................................................................................................................................... 138
makeSelection ............................................................................................................................................................. 138
remove............................................................................................................................................................................ 138
select ............................................................................................................................................................................... 138
strokePath ..................................................................................................................................................................... 138
PathItems ..................................................................................................................................................................................... 141
Properties............................................................................................................................................................................... 141
length.............................................................................................................................................................................. 141
parent.............................................................................................................................................................................. 141
typename ...................................................................................................................................................................... 141
Methods ................................................................................................................................................................................. 141
add ................................................................................................................................................................................... 141
getByName ................................................................................................................................................................... 141
removeAll ...................................................................................................................................................................... 141
PathPoint...................................................................................................................................................................................... 142
Properties............................................................................................................................................................................... 142
anchor............................................................................................................................................................................. 142
kind .................................................................................................................................................................................. 142
leftDirection.................................................................................................................................................................. 142
parent.............................................................................................................................................................................. 142
rightDirection............................................................................................................................................................... 142
typename ...................................................................................................................................................................... 142
PathPointInfo.............................................................................................................................................................................. 143
Properties............................................................................................................................................................................... 143
anchor............................................................................................................................................................................. 143
kind .................................................................................................................................................................................. 143
leftDirection.................................................................................................................................................................. 143
rightDirection............................................................................................................................................................... 143
typename ...................................................................................................................................................................... 143
PathPoints.................................................................................................................................................................................... 145
Properties............................................................................................................................................................................... 145
length.............................................................................................................................................................................. 145
parent.............................................................................................................................................................................. 145
typename ...................................................................................................................................................................... 145
PDFOpenOptions ...................................................................................................................................................................... 146
Properties............................................................................................................................................................................... 146
antiAlias.......................................................................................................................................................................... 146
bitsPerChannel ............................................................................................................................................................ 146
constrainProportions ................................................................................................................................................ 146
cropPage........................................................................................................................................................................ 146
height.............................................................................................................................................................................. 146
mode ............................................................................................................................................................................... 146
name................................................................................................................................................................................ 146
page................................................................................................................................................................................. 146
resolution....................................................................................................................................................................... 146
suppressWarnings...................................................................................................................................................... 146
typename .......................................................................................................................
............................................... 146
Adobe Photoshop CS4
JavaScript Scripting Reference 21
usePageNumber ......................................................................................................................................................... 146
width ............................................................................................................................................................................... 146
PDFSaveOptions ........................................................................................................................................................................ 147
Properties............................................................................................................................................................................... 147
alphaChannels............................................................................................................................................................. 147
annotations................................................................................................................................................................... 147
colorConversion.......................................................................................................................................................... 147
convertToEightBit....................................................................................................................................................... 147
description .................................................................................................................................................................... 147
destinationProfile ....................................................................................................................................................... 147
downgradeColorProfile............................................................................................................................................ 147
downSample ................................................................................................................................................................ 147
downSampleSize ........................................................................................................................................................ 147
downSampleSizeLimit .............................................................................................................................................. 147
embedColorProfile..................................................................................................................................................... 147
embedFonts ................................................................................................................................................................. 147
embedThumbnail....................................................................................................................................................... 147
encoding........................................................................................................................................................................ 147
interpolation................................................................................................................................................................. 147
jpegQuality ................................................................................................................................................................... 148
layers ............................................................................................................................................................................... 148
optimizeForWeb ......................................................................................................................................................... 148
outputCondition ......................................................................................................................................................... 148
outputConditionID..................................................................................................................................................... 148
PDFCompatibility........................................................................................................................................................ 148
PDFStandard ................................................................................................................................................................ 148
preserveEditing ........................................................................................................................................................... 148
presetFile ....................................................................................................................................................................... 148
profileInclusionPolicy................................................................................................................................................ 148
registryName................................................................................................................................................................ 148
spotColors ..................................................................................................................................................................... 148
tileSize............................................................................................................................................................................. 148
transparency................................................................................................................................................................. 148
typename ...................................................................................................................................................................... 148
useOutlines ................................................................................................................................................................... 148
vectorData..................................................................................................................................................................... 149
view.................................................................................................................................................................................. 149
PhotoCDOpenOptions ............................................................................................................................................................ 150
Properties............................................................................................................................................................................... 150
colorProfileName........................................................................................................................................................ 150
colorSpace..................................................................................................................................................................... 150
orientation..................................................................................................................................................................... 150
pixelSize ......................................................................................................................................................................... 150
resolution....................................................................................................................................................................... 150
typename ...................................................................................................................................................................... 150
PhotoshopSaveOptions .......................................................................................................................................................... 151
Properties............................................................................................................................................................................... 151
alphaChannels............................................................................................................................................................. 151
annotations................................................................................................................................................................... 151
embedColorProfile..................................................................................................................................................... 151
layers .........................................................................................................................
...................................................... 151
Adobe Photoshop CS4
JavaScript Scripting Reference 22
spotColors ..................................................................................................................................................................... 151
typename ...................................................................................................................................................................... 151
PICTFileSaveOptions ................................................................................................................................................................ 152
Properties............................................................................................................................................................................... 152
alphaChannels............................................................................................................................................................. 152
compression ................................................................................................................................................................. 152
embedColorProfile..................................................................................................................................................... 152
resolution....................................................................................................................................................................... 152
typename ...................................................................................................................................................................... 152
PICTResourceSaveOptions..................................................................................................................................................... 153
Properties............................................................................................................................................................................... 153
alphaChannels............................................................................................................................................................. 153
compression ................................................................................................................................................................. 153
embedColorProfile..................................................................................................................................................... 153
name................................................................................................................................................................................ 153
resolution....................................................................................................................................................................... 153
resourceID ..................................................................................................................................................................... 153
typename ...................................................................................................................................................................... 153
PicturePackageOptions........................................................................................................................................................... 154
Properties............................................................................................................................................................................... 154
content ........................................................................................................................................................................... 154
flatten.............................................................................................................................................................................. 154
font................................................................................................................................................................................... 154
fontSize........................................................................................................................................................................... 154
layout .............................................................................................................................................................................. 154
mode ............................................................................................................................................................................... 154
opacity ............................................................................................................................................................................ 154
resolution....................................................................................................................................................................... 154
text ................................................................................................................................................................................... 154
textColor ........................................................................................................................................................................ 154
textPosition................................................................................................................................................................... 154
textRotate...................................................................................................................................................................... 154
typename ...................................................................................................................................................................... 154
PixarSaveOptions ...................................................................................................................................................................... 155
Properties............................................................................................................................................................................... 155
alphaChannels............................................................................................................................................................. 155
typename ...................................................................................................................................................................... 155
PNGSaveOptions ....................................................................................................................................................................... 156
Properties............................................................................................................................................................................... 156
interlaced....................................................................................................................................................................... 156
typename ...................................................................................................................................................................... 156
Preferences.................................................................................................................................................................................. 157
Properties............................................................................................................................................................................... 157
additionalPluginFolder............................................................................................................................................. 157
appendExtension........................................................................................................................................................ 157
askBeforeSavingLayeredTIFF.................................................................................................................................. 157
autoUpdateOpenDocuments ................................................................................................................................ 157
beepWhenDone.......................................................................................................................................................... 157
colorChannelsInColor ............................................................................................................................................... 157
colorPicker..................................................................................................................................................................... 157
columnGutter...................................................................................................................
............................................ 157
Adobe Photoshop CS4
JavaScript Scripting Reference 23
columnWidth ............................................................................................................................................................... 157
createFirstSnapshot................................................................................................................................................... 157
dynamicColorSliders.................................................................................................................................................. 157
editLogItems ................................................................................................................................................................ 157
exportClipboard.......................................................................................................................................................... 158
fontPreviewSize........................................................................................................................................................... 158
fullSizePreview............................................................................................................................................................. 158
gamutWarningOpacity............................................................................................................................................. 158
gridSize........................................................................................................................................................................... 158
gridStyle ......................................................................................................................................................................... 158
gridSubDivisions ......................................................................................................................................................... 158
guideStyle...................................................................................................................................................................... 158
iconPreview .................................................................................................................................................................. 158
imageCacheLevels ..................................................................................................................................................... 158
imagePreviews ............................................................................................................................................................ 158
interpolation................................................................................................................................................................. 158
keyboardZoomResizesWindows........................................................................................................................... 158
macOSThumbnail....................................................................................................................................................... 158
maximizeCompatibility ............................................................................................................................................ 158
maxRAMuse.................................................................................................................................................................. 158
nonLinearHistory ........................................................................................................................................................ 158
numberofHistoryStates ............................................................................................................................................ 159
otherCursors................................................................................................................................................................. 159
paintingCursors........................................................................................................................................................... 159
parent.............................................................................................................................................................................. 159
pixelDoubling .............................................................................................................................................................. 159
pointSize ........................................................................................................................................................................ 159
recentFileListLength.................................................................................................................................................. 159
rulerUnits ....................................................................................................................................................................... 159
saveLogItems ............................................................................................................................................................... 159
saveLogItemsFile ........................................................................................................................................................ 159
savePaletteLocations ................................................................................................................................................ 159
showAsianTextOptions ............................................................................................................................................ 159
showEnglishFontNames .......................................................................................................................................... 159
showSliceNumber ...................................................................................................................................................... 159
showToolTips ............................................................................................................................................................... 159
smartQuotes................................................................................................................................................................. 159
typename ...................................................................................................................................................................... 159
typeUnits ....................................................................................................................................................................... 159
useAdditionalPluginFolder ..................................................................................................................................... 160
useHistoryLog .............................................................................................................................................................. 160
useLowerCaseExtension .......................................................................................................................................... 160
useShiftKeyForToolSwitch....................................................................................................................................... 160
useVideoAlpha ............................................................................................................................................................ 160
windowsThumbnail ................................................................................................................................................... 160
PresentationOptions ................................................................................................................................................................ 161
Properties............................................................................................................................................................................... 161
autoAdvance ............................................................................................................................................................... 161
includeFilename.......................................................................................................................................................... 161
interval............................................................................................................................................................................ 161
loop...........................................................................................................................
....................................................... 161
Adobe Photoshop CS4
JavaScript Scripting Reference 24
magnification............................................................................................................................................................... 161
PDFFileOptions............................................................................................................................................................ 161
presentation ................................................................................................................................................................ 161
transition........................................................................................................................................................................ 161
typename ...................................................................................................................................................................... 161
RawFormatOpenOptions ....................................................................................................................................................... 162
Properties............................................................................................................................................................................... 162
bitsPerChannel ............................................................................................................................................................ 162
byteOrder ...................................................................................................................................................................... 162
channelNumber .......................................................................................................................................................... 162
headerSize..................................................................................................................................................................... 162
height.............................................................................................................................................................................. 162
interleaveChannels .................................................................................................................................................... 162
retainHeader................................................................................................................................................................. 162
typename ...................................................................................................................................................................... 162
width ............................................................................................................................................................................... 162
RawSaveOptions........................................................................................................................................................................ 163
Properties............................................................................................................................................................................... 163
alphaChannels............................................................................................................................................................. 163
spotColors ..................................................................................................................................................................... 163
typename ...................................................................................................................................................................... 163
RGBColor....................................................................................................................................................................................... 164
Properties............................................................................................................................................................................... 164
blue.................................................................................................................................................................................. 164
green ............................................................................................................................................................................... 164
hexValue ........................................................................................................................................................................ 164
red .................................................................................................................................................................................... 164
typename ...................................................................................................................................................................... 164
Selection ....................................................................................................................................................................................... 165
Properties............................................................................................................................................................................... 165
bounds............................................................................................................................................................................ 165
parent.............................................................................................................................................................................. 165
solid ................................................................................................................................................................................. 165
typename ...................................................................................................................................................................... 165
Methods ................................................................................................................................................................................. 165
clear ................................................................................................................................................................................. 165
contract .......................................................................................................................................................................... 165
copy ................................................................................................................................................................................. 165
cut..................................................................................................................................................................................... 165
deselect .......................................................................................................................................................................... 165
expand............................................................................................................................................................................ 165
feather............................................................................................................................................................................. 165
fill ...................................................................................................................................................................................... 166
grow ................................................................................................................................................................................ 166
invert ............................................................................................................................................................................... 166
load .................................................................................................................................................................................. 166
makeWorkPath ............................................................................................................................................................ 166
resize ............................................................................................................................................................................... 166
resizeBoundary............................................................................................................................................................ 166
rotate............................................................................................................................................................................... 166
rotateBoundary .................................................................................................................
.......................................... 166
Adobe Photoshop CS4
JavaScript Scripting Reference 25
select ............................................................................................................................................................................... 166
selectAll .......................................................................................................................................................................... 166
fill ...................................................................................................................................................................................... 167
grow ................................................................................................................................................................................ 167
invert ............................................................................................................................................................................... 167
load .................................................................................................................................................................................. 167
makeWorkPath ............................................................................................................................................................ 167
resize ............................................................................................................................................................................... 167
resizeBoundary............................................................................................................................................................ 167
rotate............................................................................................................................................................................... 167
rotateBoundary ........................................................................................................................................................... 167
select ............................................................................................................................................................................... 167
selectAll .......................................................................................................................................................................... 167
fill ...................................................................................................................................................................................... 168
grow ................................................................................................................................................................................ 168
invert ............................................................................................................................................................................... 168
load .................................................................................................................................................................................. 168
makeWorkPath ............................................................................................................................................................ 168
resize ............................................................................................................................................................................... 168
resizeBoundary............................................................................................................................................................ 168
rotate............................................................................................................................................................................... 168
rotateBoundary ........................................................................................................................................................... 168
select ............................................................................................................................................................................... 168
selectAll .......................................................................................................................................................................... 168
selectBorder.................................................................................................................................................................. 169
similar.............................................................................................................................................................................. 169
smooth ........................................................................................................................................................................... 169
store................................................................................................................................................................................. 169
stroke............................................................................................................................................................................... 169
translate ......................................................................................................................................................................... 169
translateBoundary...................................................................................................................................................... 169
SGIRGBSaveOptions ................................................................................................................................................................. 172
Properties............................................................................................................................................................................... 172
alphaChannels............................................................................................................................................................. 172
spotColors ..................................................................................................................................................................... 172
typename ...................................................................................................................................................................... 172
SolidColor..................................................................................................................................................................................... 173
Properties............................................................................................................................................................................... 173
cmyk ................................................................................................................................................................................ 173
gray .................................................................................................................................................................................. 173
hsb.................................................................................................................................................................................... 173
lab..................................................................................................................................................................................... 173
model.............................................................................................................................................................................. 173
nearestWebColor........................................................................................................................................................ 173
rgb.................................................................................................................................................................................... 173
typename ...................................................................................................................................................................... 173
Methods ................................................................................................................................................................................. 173
isEqual............................................................................................................................................................................. 173
SubPathInfo................................................................................................................................................................................. 174
Properties............................................................................................................................................................................... 174
closed.........................................................................................................................
..................................................... 174
Adobe Photoshop CS4
JavaScript Scripting Reference 26
entireSubPath .............................................................................................................................................................. 174
operation ....................................................................................................................................................................... 174
typename ...................................................................................................................................................................... 174
SubPathItem................................................................................................................................................................................ 175
Properties............................................................................................................................................................................... 175
closed.............................................................................................................................................................................. 175
operation ....................................................................................................................................................................... 175
parent.............................................................................................................................................................................. 175
pathPoints ..................................................................................................................................................................... 175
typename ...................................................................................................................................................................... 175
SubPathItems.............................................................................................................................................................................. 176
Properties............................................................................................................................................................................... 176
length.............................................................................................................................................................................. 176
parent.............................................................................................................................................................................. 176
typename ...................................................................................................................................................................... 176
TargaSaveOptions..................................................................................................................................................................... 177
Properties............................................................................................................................................................................... 177
alphaChannels............................................................................................................................................................. 177
resolution....................................................................................................................................................................... 177
rleCompression ........................................................................................................................................................... 177
typename ...................................................................................................................................................................... 177
TextFont........................................................................................................................................................................................ 178
Properties............................................................................................................................................................................... 178
family............................................................................................................................................................................... 178
name................................................................................................................................................................................ 178
parent.............................................................................................................................................................................. 178
postScriptName ......................................................................................................................................................... 178
style.................................................................................................................................................................................. 178
typename ...................................................................................................................................................................... 178
TextFonts...................................................................................................................................................................................... 179
Properties............................................................................................................................................................................... 179
length.............................................................................................................................................................................. 179
parent.............................................................................................................................................................................. 179
typename ...................................................................................................................................................................... 179
Methods ................................................................................................................................................................................. 179
getByName ................................................................................................................................................................... 179
TextItem........................................................................................................................................................................................ 180
Properties............................................................................................................................................................................... 180
alternateLigatures ...................................................................................................................................................... 180
antiAliasMethod.......................................................................................................................................................... 180
autoKerning.................................................................................................................................................................. 180
autoLeadingAmount................................................................................................................................................. 180
baselineShift................................................................................................................................................................. 180
capitalization................................................................................................................................................................ 180
color................................................................................................................................................................................. 180
contents ......................................................................................................................................................................... 180
desiredGlyphScaling.................................................................................................................................................. 180
desiredLetterScaling.................................................................................................................................................. 181
desiredWordScaling .................................................................................................................................................. 181
direction......................................................................................................................................................................... 181
fauxBold .......................................................................................................................
.................................................. 181
Adobe Photoshop CS4
JavaScript Scripting Reference 27
fauxItalic......................................................................................................................................................................... 181
firstLineIndent.............................................................................................................................................................. 181
font................................................................................................................................................................................... 181
hangingPunctuation ................................................................................................................................................. 181
height.............................................................................................................................................................................. 181
horizontalScale ............................................................................................................................................................ 181
hyphenateAfterFirst................................................................................................................................................... 182
hyphenateBeforeLast................................................................................................................................................ 182
hyphenateCapitalWords .......................................................................................................................................... 182
hyphenateWordsLongerThan................................................................................................................................ 182
hyphenation ................................................................................................................................................................. 182
hyphenationZone....................................................................................................................................................... 182
hyphenLimit ................................................................................................................................................................. 182
justification ................................................................................................................................................................... 182
kind .................................................................................................................................................................................. 182
language........................................................................................................................................................................ 182
leading............................................................................................................................................................................ 182
leftIndent ....................................................................................................................................................................... 182
ligatures ......................................................................................................................................................................... 182
maximumGlyphScaling ............................................................................................................................................ 182
maximumLetterScaling ............................................................................................................................................ 183
maximumWordScaling............................................................................................................................................. 183
minimumGlyphScaling............................................................................................................................................. 183
minimumLetterScaling............................................................................................................................................. 184
minimumWordScaling.............................................................................................................................................. 184
noBreak .......................................................................................................................................................................... 184
oldStyle........................................................................................................................................................................... 184
parent.............................................................................................................................................................................. 184
position .......................................................................................................................................................................... 184
rightIndent.................................................................................................................................................................... 184
size ................................................................................................................................................................................... 184
spaceAfter ..................................................................................................................................................................... 184
spaceBefore .................................................................................................................................................................. 185
strikeThru....................................................................................................................................................................... 185
textComposer .............................................................................................................................................................. 185
tracking........................................................................................................................................................................... 185
typename ...................................................................................................................................................................... 185
underline........................................................................................................................................................................ 185
useAutoLeading.......................................................................................................................................................... 185
verticalScale.................................................................................................................................................................. 185
warpBend ...................................................................................................................................................................... 185
warpDirection .............................................................................................................................................................. 185
warpHorizontalDistortion........................................................................................................................................ 185
warpStyle....................................................................................................................................................................... 185
warpVerticalDistortion.............................................................................................................................................. 185
width ............................................................................................................................................................................... 185
Methods ................................................................................................................................................................................. 186
convertToShape.......................................................................................................................................................... 186
createPath ..................................................................................................................................................................... 186
TiffSaveOptions.......................................................................................................................................................................... 187
Properties.....................................................................................................................
.......................................................... 187
Adobe Photoshop CS4
JavaScript Scripting Reference 28
alphaChannels............................................................................................................................................................. 187
annotations................................................................................................................................................................... 187
byteOrder ...................................................................................................................................................................... 187
embedColorProfile..................................................................................................................................................... 187
imageCompression.................................................................................................................................................... 187
interleaveChannels .................................................................................................................................................... 187
jpegQuality ................................................................................................................................................................... 187
layerCompression....................................................................................................................................................... 187
layers ............................................................................................................................................................................... 187
saveImagePyramid..................................................................................................................................................... 187
spotColors ..................................................................................................................................................................... 187
transparency................................................................................................................................................................. 187
typename ...................................................................................................................................................................... 187
UnitValue...................................................................................................................................................................................... 188
xmpMetadata ............................................................................................................................................................................. 189
Properties............................................................................................................................................................................... 189
parent.............................................................................................................................................................................. 189
rawData .......................................................................................................................................................................... 189
typename ...................................................................................................................................................................... 189
3 JavaScript Resource.................................................................................................................190
JavaScript resource syntax..................................................................................................................................................... 190
Basic JavaScript resource example ............................................................................................................................... 191
Enable-info grammar ............................................................................................................................................................... 191
Undefined values in enable-info evaluation ............................................................................................................. 193
Using the "in" function...................................................................................................................................................... 194
Action Manager automation" ............................................................................................................................................... 194
Terminology dictionary .................................................................................................................................................... 194
Value type defintions .................................................................................................................................................. 195
Uniqueness rules for terminology entries.................................................................................................................. 196
Terminology definition example................................................................................................................................... 196
4 Scripting Constants .................................................................................................................198
AdjustmentReference ............................................................................................................................................... 198
AnchorPosition............................................................................................................................................................ 198
AntiAlias ......................................................................................................................................................................... 198
AutoKernType.............................................................................................................................................................. 198
BatchDestinationType .............................................................................................................................................. 198
BitmapConversionType............................................................................................................................................ 199
BitmapHalfToneType ................................................................................................................................................ 199
BitsPerChannelType................................................................................................................................................... 199
BlendMode.................................................................................................................................................................... 199
BMPDepthType ........................................................................................................................................................... 199
ByteOrder ...................................................................................................................................................................... 199
CameraRAWSettingsType........................................................................................................................................ 200
CameraRAWSize.......................................................................................................................................................... 200
ChangeMode................................................................................................................................................................ 200
ChannelType ................................................................................................................................................................ 200
ColorBlendMode......................................................................................................................................................... 201
ColorModel ................................................................................................................................................................... 201
ColorPicker.................................................................................................................................................................... 201
ColorProfileType ......................................................................................................................................................... 201
Adobe Photoshop CS4
JavaScript Scripting Reference 29
ColorReductionType.................................................................................................................................................. 201
ColorSpaceType .......................................................................................................................................................... 201
CopyrightedType........................................................................................................................................................ 201
CreateFields .................................................................................................................................................................. 202
CropToType .................................................................................................................................................................. 202
DCSType......................................................................................................................................................................... 202
DepthMapSource ....................................................................................................................................................... 202
DescValueType ............................................................................................................................................................ 202
DialogModes ................................................................................................................................................................ 202
Direction ........................................................................................................................................................................ 202
DisplacementMapType ............................................................................................................................................ 202
Dither .............................................................................................................................................................................. 203
DocPositionStyle......................................................................................................................................................... 203
DocumentFill................................................................................................................................................................ 203
DocumentMode.......................................................................................................................................................... 203
EditLogItemsType....................................................................................................................................................... 203
ElementPlacement..................................................................................................................................................... 203
EliminateFields ............................................................................................................................................................ 203
ExportType.................................................................................................................................................................... 203
Extension ....................................................................................................................................................................... 203
FileNamingType .......................................................................................................................................................... 204
FontPreviewType........................................................................................................................................................ 204
ForcedColors ................................................................................................................................................................ 204
FormatOptions ............................................................................................................................................................ 204
GalleryConstrainType................................................................................................................................................ 204
GalleryFontType.......................................................................................................................................................... 205
GallerySecurityTextColorType ............................................................................................................................... 205
GallerySecurityTextPositionType.......................................................................................................................... 205
GallerySecurityTextRotateType ............................................................................................................................. 205
GallerySecurityType................................................................................................................................................... 205
GalleryThumbSizeType............................................................................................................................................. 205
Geometry....................................................................................................................................................................... 205
GridLineStyle ................................................................................................................................................................ 205
GridSize .......................................................................................................................................................................... 205
GuideLineStyle............................................................................................................................................................. 206
IllustratorPathType..................................................................................................................................................... 206
Intent............................................................................................................................................................................... 206
Justification................................................................................................................................................................... 206
Language....................................................................................................................................................................... 206
LayerCompression...................................................................................................................................................... 206
LayerKind....................................................................................................................................................................... 207
LensType........................................................................................................................................................................ 207
MagnificationType ..................................................................................................................................................... 207
MatteType ..................................................................................................................................................................... 207
MeasurementRange .................................................................................................................................................. 207
MeasurementSource ................................................................................................................................................. 207
NewDocumentMode................................................................................................................................................. 207
NoiseDistribution........................................................................................................................................................ 208
OffsetUndefinedAreas .............................................................................................................................................. 208
OpenDocumentMode............................................................................................................................................... 208
OpenDocumentType...............................................................................................................
.................................. 208
Adobe Photoshop CS4
JavaScript Scripting Reference 30
OperatingSystem........................................................................................................................................................ 208
Orientation.................................................................................................................................................................... 208
OtherPaintingCursors ............................................................................................................................................... 209
PaintingCursors ........................................................................................................................................................... 209
PaletteType................................................................................................................................................................... 209
PathKind......................................................................................................................................................................... 209
PDFCompatibility........................................................................................................................................................ 209
PDFEncoding................................................................................................................................................................ 209
PDFResample ............................................................................................................................................................... 210
PDFStandard ................................................................................................................................................................ 210
PhotoCDColorSpace.................................................................................................................................................. 210
PhotoCDSize................................................................................................................................................................. 210
PICTBitsPerPixels......................................................................................................................................................... 210
PICTCompression........................................................................................................................................................ 210
PicturePackageTextType.......................................................................................................................................... 210
PointKind ....................................................................................................................................................................... 211
PointType ...................................................................................................................................................................... 211
PolarConversionType................................................................................................................................................ 211
Preview........................................................................................................................................................................... 211
PrintColorHandling .................................................................................................................................................... 211
PrintEncoding .............................................................................................................................................................. 211
PurgeTarget.................................................................................................................................................................. 211
QueryStateType........................................................................................................................................................... 211
RadialBlurMethod....................................................................................................................................................... 211
RadialBlurQuality ........................................................................................................................................................ 211
RasterizeType ............................................................................................................................................................... 211
ReferenceFormType .................................................................................................................................................. 212
ResampleMethod ....................................................................................................................................................... 212
RippleSize ...................................................................................................................................................................... 212
SaveBehavior................................................................................................................................................................ 212
SaveDocumentType .................................................................................................................................................. 212
SaveEncoding .............................................................................................................................................................. 212
SaveLogItemsType..................................................................................................................................................... 212
SaveOptionsType........................................................................................................................................................ 212
SelectionType............................................................................................................................................................... 213
ShapeOperation.......................................................................................................................................................... 213
SmartBlurMode ........................................................................................................................................................... 213
SmartBlurQuality......................................................................................................................................................... 213
SourceSpaceType ....................................................................................................................................................... 213
SpherizeMode.............................................................................................................................................................. 213
StrikeThruType ............................................................................................................................................................ 213
StrokeLocation............................................................................................................................................................. 213
TargaBitsPerPixels ...................................................................................................................................................... 213
TextCase......................................................................................................................................................................... 214
TextComposer.............................................................................................................................................................. 214
TextType ........................................................................................................................................................................ 214
TextureType.................................................................................................................................................................. 214
TIFFEncoding................................................................................................................................................................ 214
ToolType ........................................................................................................................................................................ 214
TransitionType ............................................................................................................................................................. 214
TrimType .......................................................................................................................
................................................. 215
Loading...
+ 202 hidden pages