background image

Adobe Photoshop CS3

JavaScript Scripting Reference

 JavaScript Object Reference     105

ExportOptionsIllustrator

Options that can be specified when exporting a 

PathItem

 object to an Adobe Illustrator® file. 

Properties

Property

Value Type

What it is

path

IllustratorPathType

Read-write. The type of path to export 
(default: 

IllustratorPathType.DOCUMENTBOUNDS

).

pathName

string

Read-write. The name of the path to export.

Note:

Valid only when 

path = 

IllustratorPathType.NAMEDPATH

See 

path

.

typename

string

Read-only. The class name of the referenced 

exportOptionsIllustrator

 

object.

Содержание 19400084 - Photoshop CS3 Extended

Страница 1: ...bbc JAVASCRIPT SCRIPTING REFERENCE...

Страница 2: ...nited States and or other countries Apple Mac OS and Macintosh are trademarks of Apple Computer Inc registered in the United States and other countries Microsoft and Windows are either registered trad...

Страница 3: ...ds Tables 35 executeAction 36 Working with Method Parameters 36 ActionDescriptor 37 Properties 37 count 37 typename 37 Methods 37 clear 37 erase 37 fromStream 37 getBoolean 37 getClass 37 getData 37 g...

Страница 4: ...nType 40 getEnumerationValue 40 getInteger 40 getList 40 getObjectType 40 getObjectValue 41 getPath 41 getReference 41 getString 41 getType 41 getUnitDoubleType 41 getUnitDoubleValue 41 putBoolean 41...

Страница 5: ...documents 45 fonts 45 foregroundColor 45 freeMemory 45 locale 45 macintoshFileTypes 45 measurementLog 45 name 46 notifiers 46 notifiersEnabled 46 path 46 playbackDisplayDialogs 46 playbackParameters...

Страница 6: ...ity 53 grouped 53 isBackgroundLayer 53 kind 53 linkedLayers 54 name 54 opacity 54 parent 54 pixelsLocked 54 positionLocked 54 textItem 54 transparentPixelsLocked 54 typename 54 visible 54 Methods 54 a...

Страница 7: ...plySharpen 58 applySharpenEdges 59 applySharpenMore 59 applyShear 59 applySmartBlur 59 applySpherize 59 applyStyle 59 applyTextureFill 59 applyTwirl 59 applyUnSharpMask 59 applyWave 59 applyZigZag 60...

Страница 8: ...l 67 suppressOpen 67 suppressProfile 67 typename 67 unixCompatible 67 windowsCompatible 67 BitmapConversionOptions 68 Properties 68 angle 68 frequency 68 method 68 patternName 68 resolution 68 shape 6...

Страница 9: ...ze 71 temperature 71 tint 71 typename 71 vignettingAmount 71 vignettingMidpoint 71 whiteBalance 71 Channel 72 Properties 72 color 72 histogram 72 kind 72 name 72 opacity 72 parent 72 typename 73 visib...

Страница 10: ...ndex 81 add 81 getByName 81 removeAll 81 ContactSheetOptions 82 Properties 82 acrossFirst 82 bestFit 82 caption 82 columnCount 82 flatten 82 font 82 fontSize 82 height 82 horizontal 82 mode 82 resolut...

Страница 11: ...ncoding 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 8...

Страница 12: ...ickMaskMode 91 resolution 91 saved 91 selection 91 typename 91 width 91 xmpMetadata 91 Methods 92 autoCount 92 changeMode 92 close 92 convertProfile 92 crop 93 duplicate 93 exportDocument 93 flatten 9...

Страница 13: ...l 99 parent 99 provinceState 99 source 99 supplementalCategories 99 title 99 transmissionReference 99 typename 99 urgency 99 Documents 102 Properties 102 length 102 parent 102 typename 102 Methods 102...

Страница 14: ...format 106 includeProfile 106 interlaced 106 lossy 106 matteColor 106 optimized 106 PNG8 107 quality 107 transparency 107 transparencyAmount 107 transparencyDither 107 typename 107 webSnap 107 Gallery...

Страница 15: ...ions 112 emailAddress 112 imagesOptions 112 includeSubFolders 112 layoutStyle 112 preserveAllMetadata 112 securityOptions 112 thumbnailOptions 112 typename 112 useShortExtension 112 useUTF8Encoding 11...

Страница 16: ...rties 117 gray 117 typename 117 HistoryState 118 Properties 118 name 118 parent 118 snapshot 118 typename 118 HistoryStates 119 Properties 119 length 119 parent 119 typename 119 Methods 119 index 119...

Страница 17: ...nce 124 comment 124 name 124 parent 124 position 124 selected 124 typename 124 visibility 124 Methods 124 apply 124 recapture 124 remove 125 resetfromComp 125 LayerComps 126 Properties 126 length 126...

Страница 18: ...129 rotate 129 translate 129 unlink 129 LayerSets 130 Properties 130 length 130 parent 130 typename 130 Methods 130 index 130 add 130 getByName 130 removeAll 130 MeasurementLog 132 Methods 132 export...

Страница 19: ...ethods 139 deselect 139 duplicate 139 fillPath 139 makeClippingPath 140 makeSelection 140 remove 140 select 140 strokePath 140 PathItems 143 Properties 143 length 143 parent 143 typename 143 Methods 1...

Страница 20: ...width 147 PDFSaveOptions 148 Properties 148 alphaChannels 148 annotations 148 colorConversion 148 convertToEightBit 148 description 148 destinationProfile 148 downgradeColorProfile 148 downSample 148...

Страница 21: ...annotations 152 embedColorProfile 152 layers 152 spotColors 152 typename 152 PICTFileSaveOptions 153 Properties 153 alphaChannels 153 compression 153 embedColorProfile 153 resolution 153 typename 153...

Страница 22: ...umnGutter 158 columnWidth 159 createFirstSnapshot 159 dynamicColorSliders 159 editLogItems 159 exportClipboard 159 fontPreviewSize 159 fullSizePreview 159 gamutWarningOpacity 159 gridSize 159 gridStyl...

Страница 23: ...entationOptions 162 Properties 162 autoAdvance 162 includeFilename 162 interval 162 loop 162 magnification 162 pDFFileOptions 162 presentation 162 transition 162 typename 162 RawFormatOpenOptions 163...

Страница 24: ...ry 167 rotate 167 rotateBoundary 167 select 167 selectAll 167 selectBorder 168 similar 168 smooth 168 store 168 stroke 168 translate 168 translateBoundary 168 SGIRGBSaveOptions 171 Properties 171 alph...

Страница 25: ...resolution 176 rleCompression 176 typename 176 TextFont 177 Properties 177 family 177 name 177 parent 177 postScriptName 177 style 177 typename 177 TextFonts 178 Properties 178 length 178 parent 178...

Страница 26: ...181 leftIndent 181 ligatures 181 maximumGlyphScaling 182 maximumLetterScaling 182 maximumWordScaling 182 minimumGlyphScaling 183 minimumLetterScaling 183 minimumWordScaling 183 noBreak 183 oldStyle 18...

Страница 27: ...ing Constants 188 AdjustmentReference 188 AnchorPosition 188 AntiAlias 188 AutoKernType 188 BatchDestinationType 188 BitmapConversionType 188 BitmapHalfToneType 188 BitsPerChannelType 188 BlendMode 18...

Страница 28: ...tyType 194 GalleryThumbSizeType 194 Geometry 194 GridLineStyle 194 GridSize 194 GuideLineStyle 194 IllustratorPathType 194 Intent 194 JavaScriptExecutionMode 194 Justification 194 Language 195 LayerCo...

Страница 29: ...199 RippleSize 199 SaveBehavior 199 SaveDocumentType 200 SaveEncoding 200 SaveLogItemsType 200 SaveOptions 200 SelectionType 200 ShapeOperation 200 SmartBlurMode 200 SmartBlurQuality 201 SourceSpaceT...

Страница 30: ...Example 205 Enable Info Grammar 205 Undefined Values in Enable Info Evaluation 207 Using the in Function 208 Action Manager Automation 208 Terminology Dictionary 208 Value Type Defintions 209 Uniquene...

Страница 31: ...fference between using the js and jsx extension However if the script is launched by double clicking on it a script with the js extension is interpreted with the Microsoft JScript engine and it cannot...

Страница 32: ...hed Selecting Browse displays a file browser dialog which allows you to select a script file for execution Only js or jsx files are displayed in the browse dialog When you select a script file it is e...

Страница 33: ...This feature is available only in the Extended Version New JavaScript Resource that allows scripts to behave like plug ins Provides a way to specify a menu the script appears in a terminology resource...

Страница 34: ...hod it now returns the PathItem The Document resizeImage command now behaves correctly for percentages In CS2 it was off by 2 decimal places E g 25 0 25 The LensBlurOptions object has been removed All...

Страница 35: ...lowing Properties table sample The property s input status read only or read write A description that explains what the property is Descriptions are omitted for self explanatory properties Working wit...

Страница 36: ...must separate the parameters with a comma as indicated by the comma that precedes each optional parameter in the table Also if you use an optional parameter you must enter the values in the order the...

Страница 37: ...se key number long Erases a key from the descriptor fromStream value string Creates a descriptor from a stream of bytes for reading from disk getBoolean key number long boolean Gets the value of a key...

Страница 38: ...type UnitDouble getUnitDoubleValue key number long number double Gets the value of a key of type UnitDouble hasKey key number long boolean Checks whether the descriptor contains the provided key isEq...

Страница 39: ...lue for a key whose type is path Note For information about the File object see the JavaScript Tools Guide putReference key value number long ActionReference Sets the value for a key whose type is an...

Страница 40: ...d only The class name of the referenced ActionList object Method Parameter Type Returns What it does clear Clears the list getBoolean index number long boolean Gets the value of a list item of type bo...

Страница 41: ...nitDoubleValue index number long number double Gets the unit value of a list item of type double putBoolean value boolean Sets the value to either true or false putClass value number long Sets the cla...

Страница 42: ...value of a list item whose type a reference to an object created in the script putString value string Sets the value of a list item of type string putUnitDouble classID value number long number double...

Страница 43: ...pieces to the reference This looks like another reference but it is actually part of the same reference getDesiredClass number long Gets a number representing the class of the object getEnumeratedType...

Страница 44: ...er long Puts a new identifier and value into the reference putIndex desiredClass value number long number long Puts a new index and value into the reference putName desiredClass value number long stri...

Страница 45: ...72 docRef NewDocumentMode RGB Properties Property Value Type What it is activeDocument Document Read write The frontmost document Setting this property is equivalent to clicking an open document in th...

Страница 46: ...e speed at which Adobe Photoshop CS3 plays actions preferences Preferences Read only The application preference settings equivalent to selecting Edit Preferences in the Adobe Photoshop CS3 application...

Страница 47: ...ormation about the File object see the JavaScript Tools Guide beep Causes a beep sound bringToFront Makes Adobe Photoshop CS3 the active front most application charIDToTypeID charID string number long...

Страница 48: ...the specified files makePDFPresentation inputFiles outputFiles options array of File File PresentationOptions string Creates an Adobe PDF presentation file from the specified input files Note The retu...

Страница 49: ...the open method openDialog array of File Uses the Photoshop open dialog box to select files Returns an array of File representing the files selected Note For information about the File object see the...

Страница 50: ...hotoshop CS3 is installed and add the path to the message add the optional parameter fsName to the path property to display the file system name in the most common format message I m installed in app...

Страница 51: ...Second Sample Script The following script presents a progression of images as an Adobe PDF slide show PDFPresentation jsx use all the files in the Samples folder var inputFolder new Folder app path Sa...

Страница 52: ...S3 JavaScript Scripting Reference JavaScript Object Reference 52 Note To run this code on non English platforms substitute the following path for the outputFile variable var outputFile File JavaScript...

Страница 53: ...Value Type What it is allLocked boolean Read write Indicates whether to completely lock the layer s contents and settings blendMode BlendMode Read write The layer s blending mode bounds array UnitValu...

Страница 54: ...ind TEXT See kind transparentPixelsLocked boolean Read write Indicates whether editing is confined to the opaque portions of the layer typename string Read only The class name of the referenced artLay...

Страница 55: ...e filter amount 0 1 400 as a percentage applyAverage Applies the Average filter applyBlur Applies the Blur filter applyBlurMore Applies the Blur More filter applyClouds Applies the Clouds filter apply...

Страница 56: ...ng number long Applies the Dust Scratches filter radius 1 100 threshold 0 255 applyGaussianBlur radius number double Applies the Gaussian Blur filter within the specified radius in pixels 0 1 250 0 ap...

Страница 57: ...XAGON radius The radius of the iris default 15 bladeCurvature The blade curvature of the iris default 0 rotation The rotation of the iris default 0 brightness The brightness for the specular highlight...

Страница 58: ...as UnitValue UnitValue OffsetUndefinedAreas Moves the layer the specified amount horizontally and vertically min max amounts depend on layer size leaving an undefined area at the layer s original loca...

Страница 59: ...ill textureFile File Applies the Texture Fill filter Note For information about the File object see the JavaScript Tools Guide applyTwirl angle number long Applies the Twirl filter at the specified an...

Страница 60: ...ipboard cut Cuts the layer to the clipboard desaturate Converts a color image to a grayscale image in the current color mode by assigning equal values of each component color to each pixel duplicate r...

Страница 61: ...200 200 followed by a constant value 200 200 Note When monochrome true the maximum number of channel value specifications is 1 Note Valid only when docRef mode DocumentMode RGB or docRef mode Document...

Страница 62: ...d reds yellows greens cyans blues magentas whites neutrals blacks AdjustmentReference array of numbers long array of numbers long array of numbers long array of numbers long array of numbers long arra...

Страница 63: ...amples into var mergedDoc app documents add 1000 1000 72 Merged Samples NewDocumentMode RGB DocumentFill TRANSPARENT 1 Use the path to the application and append the samples folder var samplesFolder F...

Страница 64: ...e 2 var selRegion Array Array topLeftH docH topLeftV docV Array topLeftH docH docH topLeftV docV Array topLeftH docH docH topLeftV docV docV Array topLeftH docH topLeftV docV docV Array topLeftH docH...

Страница 65: ...f ArtLayers add Properties Methods Property Value Type What it is length number long Read only The number of elements in the artLayers collection parent object Document Read only The object s containe...

Страница 66: ...n destination BatchDestinationType FOLDER See destination Note For information about the File object see the JavaScript Tools Guide errorFile File Read write The file in which to log errors encountere...

Страница 67: ...suppressOpen boolean Read write Indicates whether to suppress the file open options dialogs default false suppressProfile boolean Read write Indicates whether to suppress the color profile warnings de...

Страница 68: ...only when method BitmapConversionType HALFTONESCREEN See method method BitmapConversionType Read write The conversion method to use default BitmapConversionType DIFFUSIONDITHER patternName string Read...

Страница 69: ...write The number of bits per channel flipRowOrder boolean Read write Indicates whether to write the image from top to bottom default false Note Available only when osType OperatingSystem WINDOWS See o...

Страница 70: ...noise reduction of the shot 0 100 colorSpace ColorSpaceType Read write The colorspace for the image contrast number long Read write The contrast of the shot 50 100 exposure number double Read write Th...

Страница 71: ...er long Read write The temperature of the shot 2000 50000 tint number long Read write The tint of the shot 150 150 typename string Read only The class name of the referenced cameraRAWOpenOptions objec...

Страница 72: ...code The following example uses correct syntax to refer to a Channel object by name and then assign its opacity property value documents 0 channel my channelr opacity 22 The following example which u...

Страница 73: ...f the referenced channel object visible boolean Read write Indicates whether the channel is visible Property Value Type What it is Continued Method Parameter Type Returns What it does duplicate target...

Страница 74: ...truction that uses a break statement The break statement requires an ending semicolon as in the following sample break Histogram jsx Save the current preferences var startRulerUnits app preferences ru...

Страница 75: ...Feed fileOut open w TEXT write out a header fileOut write Histogram report for docRef name find out how many pixels I have var totalCount docRef width value docRef height value more info to the out fi...

Страница 76: ...rtRulerUnits app preferences typeUnits startTypeUnits app displayDialogs startDisplayDialogs Utility function that takes a histogram and name and dumps to the output file function OutputHistogram inHi...

Страница 77: ...file inOutFile write histogramIndex some spacing to make it look nice inOutFile write figure out how many X s I need var outputX inHistogram histogramIndex largestCount 100 output the X s for var a 0...

Страница 78: ...CHANNEL default visibleChannelCount inDocument channels length 1 break now get the channels to activate into a local array var aChannelArray new Array index for the active channels array var aChannelI...

Страница 79: ...number double Read write The black color value as percent 0 0 100 0 cyan number double Read write The cyan color value as percent 0 0 100 0 magenta number double Read write The magenta color value as...

Страница 80: ...the horizontal and vertical location of the count item Note For information about the UnitValue object see the JavaScript Tools Guide parent object Document Read only The ColorSampler object s contai...

Страница 81: ...s in the ColorSamplers collection parent object Document Read only The ColorSamplers object s container typename string Read only The class name of the referenced ColorSamplers object Method Parameter...

Страница 82: ...tten all layers in the final document default true font GalleryFontType Read write The font used for the caption default GalleryFontType ARIAL fontSize number long Read write The font size to use for...

Страница 83: ...83 vertical number long Read write The vertical spacing in pixels between images 0 29000 default 1 Note Valid only when useAutoSpacing false width number long Read write The width in pixels of the re...

Страница 84: ...Adobe Photoshop CS3 help on the Count Tool Properties Methods Property Value type What it is position array of UnitValue Read only The position of the count item in the document Note For information...

Страница 85: ...r long Read only The number of elements in the CountItems collection parent object Document Read only The CountItems object s container typename string Read only The class nameof the referenced CountI...

Страница 86: ...ding BINARY halftoneScreen boolean Read write Indicates whether to include halftone screen default false interpolation boolean Read write Indicates whether to use image interpolation default false pre...

Страница 87: ...ne screen default false interpolation boolean Read write Indicates whether to use image interpolation default false multiFileDCS boolean Read write Indicates whether to save color channels as multiple...

Страница 88: ...mation anonymous columns number long Read write Number of columns in n up configuration reverse boolean Read write Indicates whether to reverse invert the image rows number long Read write The number...

Страница 89: ...ame and then assign its colorProfileType property value document my document colorProfileType ColorProfile CUSTOM The following example which uses an upper case D in the object name is incorrect Docum...

Страница 90: ...stogram array of 256 numbers long Read only A histogram showing the number of pixels at each color intensity level for the composite channel Note Valid only when mode DocumentMode RGB mode DocumentMod...

Страница 91: ...whether the document is in Quick Mask mode resolution number double Read only The document s resolution in pixels per inch saved boolean Read only Indicates whether the document has been saved since...

Страница 92: ...ationMode options ChangeMode BitmapConversionOptions or IndexedConversionOptions Changes the color profile close saving SaveOptions Closes the document If any changes have been made the script present...

Страница 93: ...r name provides the name for the duplicated document The optional parameter mergeLayersOnly indicates whether to only duplicate merged layers exportDocument exportIn exportAs options File ExportType E...

Страница 94: ...Color meaning one of the working color spaces or Lab color or a string specifying a specific colorspace default nothing rasterizeAllLayers Rasterizes all layers recordMeasurements source dataPoints M...

Страница 95: ...he File object see the JavaScript Tools Guide splitChannels array of Document objects Splits the document channels into separate images suspendHistory historyString javaScriptString string string Prov...

Страница 96: ...ferences rulerUnits Units PIXELS app preferences typeUnits TypeUnits PIXELS app displayDialogs DialogModes NO first close all the open documents while app documents length app activeDocument close Ope...

Страница 97: ...width value mergedDoc height value 2 Array 0 mergedDoc height value 2 Array 0 0 Create the selection mergedDoc selection select selRegion Paste in the flower mergedDoc paste do the same thing for the...

Страница 98: ...ef DocumentInfo author Mr Adobe programmer docRef DocumentInfo caption Adobe Photo shoot docRef DocumentInfo copyrighted CopyrightedType COPYRIGHTEDWORK Properties Property Value Type What it is autho...

Страница 99: ...righted status Copyrighted Work country USA state CA Save the new documents in JPEG format with a low quality setting DocumentInfo jsx Save the current preferences var startDisplayDialogs app displayD...

Страница 100: ...n docRef info author Mr Adobe programmer docRef info caption Adobe Photo shoot docRef info captionWriter Mr Adobe programmer docRef info city San Jose docRef info copyrightNotice Copyright c Adobe pro...

Страница 101: ...rence 101 docRef bitsPerChannel BitsPerChannelType EIGHT save and close docRef saveAs new File outputFolder Output i jpg jpegOptions don t modify the original docRef close SaveOptions DONOTSAVECHANGES...

Страница 102: ...nts in the documents collection parent object Application Read only The documents objects container typename string Read only The classname of the referenced documents object Method Parameter Type Ret...

Страница 103: ...oportions of the image height UnitValue Read write The height of the image unit value Note For information about the UnitValue type see the JavaScript Tools Guide mode OpenDocumentMode Read write The...

Страница 104: ...Preview Read write The preview type psColorManagement boolean Read write Indicates whether to use Postscript color management default false transferFunction boolean Read write Indicates whether to in...

Страница 105: ...e Illustrator file Properties Property Value Type What it is path IllustratorPathType Read write The type of path to export default IllustratorPathType DOCUMENTBOUNDS pathName string Read write The na...

Страница 106: ...rite The amount of dither default 100 Note Valid only when dither Dither DIFFUSION See dither format SaveDocumentType Read write The file format to use default SaveDocumentType COMPUSERVEGIF Note For...

Страница 107: ...rent areas of the image should be included in the saved image default true transparencyAmount number long Read write The amont of transparency dither default 100 Note Valid only if transparency true S...

Страница 108: ...e Options area of the Web Photo Gallery dialog Properties Property Value Type What it is contactInfo string Read write The web photo gallery contact info date string Read write The web photo gallery d...

Страница 109: ...allery and then choosing Preserve all metadata on the Options area of the Web Photo Gallery dialog Properties Property Value Type What it is activeLinkColor RGBColor Read write The color to use to ind...

Страница 110: ...ean Read write Indication of whether to generate image captions default false dimension number long Read write The resized image dimensions in pixels default 350 Note Valid only when resizeImages true...

Страница 111: ...tion true See caption numericLinks boolean Read write Indication of whether to add numeric links default true resizeConstraint GalleryConstrainType Read write The image dimensions to constrain in the...

Страница 112: ...ow on the web page imagesOptions GalleryImagesOptions Read write The options related to images settings includeSubFolders boolean Read write Indication of whether to include all files found in sub fol...

Страница 113: ...fault GallerySecurityType NONE font GalleryFontType Read write The web photo gallery security font default GalleryFontType ARIAL fontSize number long Read write The web photo gallery security font siz...

Страница 114: ...s on the page default 5 dimension number long Read write The web photo gallery thumbnail dimension in pixels default 75 font GalleryFontType Read write The web photo gallery font default GalleryFontTy...

Страница 115: ...he amount of dither 1 100 default 75 Note Valid only when dither Dither DIFFUSION See dither forced ForcedColors Read write The type of colors to force into the color palette interlaced boolean Read w...

Страница 116: ...ect Reference 116 transparency boolean Read write Indicates whether to preserve transparent areas of the image during conversion to GIF format typename string Read only The class name of the reference...

Страница 117: ...cript Object Reference 117 GrayColor Options for defining a gray color Properties Property Value Type What it is gray number double Read write The gray value 0 0 100 0 default 0 0 typename string Read...

Страница 118: ...HistoryState in your code The following example uses correct syntax to refer to a HistoryState object named AddLayerMask and then assign its snapshot property value documents 0 historyState AddLayerMa...

Страница 119: ...istoryStates collection selRef fill activeDocument historyStates 7 The following example which uses an upper case H in the object name is incorrect selRef fill activeDocument HistoryStates 7 Propertie...

Страница 120: ...B color model Properties Property Value Type What it is brightness number double Read write The brightness value between 0 0 and 100 0 hue number double Read write The hue value between 0 0 and 360 0...

Страница 121: ...e Valid only when dither Dither diffusion forced ForcedColors Read write The type of colors to force into the color palette matte MatteType Read write The color to use to fill anti aliased edges adjac...

Страница 122: ...matte MatteType Read write The color to use to fill anti aliased edges adjacent to transparent areas of the image default MatteType WHITE Note When transparency false the matte color is applied to tr...

Страница 123: ...when defining a color object using the LAB color model Properties Property Value Type What it is a number double Read write The a value 128 0 127 0 b number double Read write The b value 128 0 127 0 l...

Страница 124: ...ment LayerComp myLayerComp comment View from shoreline Properties Methods Property Value Type What it is appearance boolean Read write Indicates whether to use layer appearance layer styles settings c...

Страница 125: ...3 JavaScript Scripting Reference JavaScript Object Reference 125 remove Deletes the layerComp object resetfromComp Resets the layer comp state to the document state Method Parameter Type Returns What...

Страница 126: ...is incorrect activeDocument LayerComps add myLayerComp View from Shoreline true true true Properties Methods Property Value Type What it is length number long Read only The number of elements in the...

Страница 127: ...erNum app activeDocument layers length alert layerNum The following example uses an upper case L which is incorrect var layerNum app activeDocument Layers length alert layerNum Properties Methods Prop...

Страница 128: ...contents in the layers contained in the layerSet object are editable artLayers ArtLayers Read only The artLayer objects in this layer set blendMode BlendMode Read write The blend mode to use for the...

Страница 129: ...ArtLayer or LayerSet ElementPlacement Moves the layerSet object remove Deletes the layerSet object resize horizontal vertical anchor number double number double AnchorPosition Resizes all layers in th...

Страница 130: ...Set Inside n Set where n represents the ordinal number of the set first second or third Note The script uses the ExtendScript object For further details see the JavaScript Tools Guide LayerSets jsx le...

Страница 131: ...ext etc myLayerSets 1 0 moveAfter myLayerSets 0 0 myLayerSets 2 0 moveAfter myLayerSets 1 0 Create a layer set inside each layer set for i 0 i 3 i myLayerSets i 0 name textArray i Set myLayerSets i 1...

Страница 132: ...ture is available in the Extended Version only Because the MeasurementLog class is a property of the Application object you use the property name measurementLog rather than the class name MeasurementL...

Страница 133: ...Document object you use the property name measurementScale rather than the class name MeasurementScale in your code For example activeDocument measurementScale pixelLength 25 The following code incor...

Страница 134: ...Script Scripting Reference JavaScript Object Reference 134 NoColor An object that represents a missing color Properties Property Value type What it is typename string Read only The class name of the r...

Страница 135: ...ring Read only The event ID in four characters or a unique string that the notifier is associated with Note For a list of four character codes see Appendix A Event ID Codes eventClass string Read only...

Страница 136: ...Parameter type Returns What it does remove Deletes the notifier object Note You can remove a notifier object from the Script Events Manager drop down list by deleting the file named Script Events Mana...

Страница 137: ...ss is a property of the Application object you use the property name notifiers rather than the class name Notifiers in your code For example var notRef app notifiers add OnClickGoButton eventFile The...

Страница 138: ...code eventFile defines the script file that executes when the event occurs Note An eventClass value corresponds to the class of object the event is applied to four characters or a unique string When...

Страница 139: ...athKind Read write The pathItem object s type name string Read write The pathItem object s name parent object Document Read only The pathItem object s container SubPathItems SubPathItems Read only The...

Страница 140: ...ar docRef app documents add 5000 7000 72 Simple Line line 1 it s a straight line so the coordinates for anchor left and right for each point have the same coordinates var lineArray new Array lineArray...

Страница 141: ...n lineArray2 1 anchor lineArray2 1 rightDirection lineArray2 1 anchor lineSubPathArray 1 new SubPathInfo lineSubPathArray 1 operation ShapeOperation SHAPEXOR lineSubPathArray 1 closed false lineSubPat...

Страница 142: ...ineSubPathArray 2 closed false lineSubPathArray 2 entireSubPath lineArray3 create the path item var myPathItem docRef pathItems add A Line lineSubPathArray stroke it so we can see something myPathItem...

Страница 143: ...Item objects in the pathItems collection parent object document Read only The pathItems object s container typename string Read only The class name of the referenced pathItems object Method Parameter...

Страница 144: ...eftDirection rightDirection are points representing the control handle end points Note For information about the UnitValue type see the JavaScript Tools Guide kind PointKind Read only The PathPoint ob...

Страница 145: ...bend the curve outward or make it convex you use the right direction point to bend the curve inward or make it concave Properties Property Value Type What it is anchor array Read write The x and y co...

Страница 146: ...ore information Properties Methods Property Value Type What it is length number long Read only The number of elements in the PathPoints collection parent object SubPathItem Read only The PathPoints ob...

Страница 147: ...t UnitValue Deprecated for Adobe Photoshop CS3 mode OpenDocumentMode Read write The color model to use name string Read write The name of the document page number long Read write The page to which to...

Страница 148: ...destinationProfile string Read write Description of the final RGB or CMYK output device such as a monitor or a press standard downgradeColorProfile boolean Deprecated for Adobe Photoshop CS3 downSampl...

Страница 149: ...e the document compatible with PDFStandard PDFStandard Read write The PDF standard to make the document compatible with preserveEditing boolean Read write Indicates whether to reopen the PDF in Adobe...

Страница 150: ...t Scripting Reference JavaScript Object Reference 150 vectorData boolean Deprecated for Adobe Photoshop CS3 view boolean Read write Indicates whether to open the saved PDF in Adobe Acrobat Property Va...

Страница 151: ...resolution files from Pro Photo CD discs Properties Property Value Type What it is colorProfileName string Read write The profile to use when reading the image colorSpace PhotoCDColorSpace Read write...

Страница 152: ...e Indicates whether to save the alpha channels annotations boolean Read write Indicates whether to save the annotations embedColorProfile boolean Read write Indicates whether to embed the color profil...

Страница 153: ...it is alphaChannels boolean Read write Indicates whether to save the alpha channels compression PICTCompression Read write default PICTCompression NONE embedColorProfile boolean Read write Indicates...

Страница 154: ...a channels compression PICTCompression Read write The type of compression to use default PICTCompression NONE embedColorProfile boolean Read write Indicates whether to embed the color profile in the d...

Страница 155: ...efault 2 5x7 mode NewDocumentMode Read write Read write The color profile to use as the document mode default NewDocumentMode RGB opacity number long Read write The web page security opacity as a perc...

Страница 156: ...arSaveOptions Options that can be specified when saving a document in Pixar format Properties Property Value Type What it is alphaChannels boolean Read write Indicates whether to save the alpha channe...

Страница 157: ...Options Options that can be specified when saving a document in PNG format Properties Property Value Type What it is interlaced boolean Read write Indicates whether the should rows be interlaced defau...

Страница 158: ...ns of individual settings please refer to Adobe Photoshop CS3 Help Properties Property Value Type What it is additionalPluginFolder File Read write The path to an additional plug in folder Note Valid...

Страница 159: ...es whether to show font previews in the type tool font menus fullSizePreview boolean Read write Mac only Indicates whether to show image preview as a full size image or thumbnail gamutWarningOpacity n...

Страница 160: ...rite The number of history states to preserve 1 100 otherCursors OtherPaintingCursors Read write The type of pointer to use paintingCursors PaintingCursors Read write The type of pointer to use parent...

Страница 161: ...name of the referenced preferences object typeUnits TypeUnits Read write The unit type size that the numeric inputs are assumed to represent useAdditionalPluginFolder boolean Read write Indicates whe...

Страница 162: ...ote Valid only when AutoAdvance true See autoAdvance loop boolean Read write Indicates whether to begin the presentation again after the last page default false Note Valid only when autoAdvance true S...

Страница 163: ...value of channelNumber cannot exceed the number of channels in the image When bitsPerChannel BitsPerChannelType SIXTEEN only the following values are valid 1 3 or 4 See bitsPerChannel headerSize numbe...

Страница 164: ...ed when saving a document in RAW format Properties Property Value Type What it is alphaChannels boolean Read write Indicates whether alpha channels should be saved spotColors boolean Read write Indica...

Страница 165: ...t it is blue number double Read write The blue color value 0 0 255 0 default 255 0 green number double Read write The green color value 0 0 255 0 default 255 0 hexValue string Read write The hex repre...

Страница 166: ...selection parent object Document Read only The object s container solid boolean Read only Indicates if the bounding rectangle is a solid typename string Read only The class name of the referenced sel...

Страница 167: ...r double Makes this selection item the work path for this document resize horizontal vertical anchor number double number double AnchorPosition Resizes the selected area to the specified dimensions an...

Страница 168: ...pp preferences typeUnits selectBorder width UnitValue Selects the selection border only in the specified width subsequent actions do not affect the selected area within the borders similar tolerance a...

Страница 169: ...o shift the selection one square to the right on every other row and then shift back for the rows in between var shiftIt true loop through vertically to create the first row for var v 0 v docSize v ce...

Страница 170: ...t Reset the application preferences app preferences rulerUnits startRulerUnits app preferences typeUnits startTypeUnits app displayDialogs startDisplayDialogs A helper function for debugging It also h...

Страница 171: ...format Note The SGIRGB format is not installed automatically with Adobe Photoshop CS3 Properties Property Value Type What it is alphaChannels boolean Read write Indicates whether to save the alpha ch...

Страница 172: ...b HSBColor Read write The HSB color mode lab LabColor Read write The LAB color mode model ColorModel Read write The color model nearestWebColor RGBColor Read only The nearest web color to the current...

Страница 173: ...s This method creates the SubPathItem objects associated with each SubPathInfo object and returns a PathItem object that is the path represented by all the sub paths Properties Property Value Type Wha...

Страница 174: ...etrieve information about a path Note that all of the SubPathItem object s properties are Read only Properties Property Value Type What it is closed boolean Read only Indicates whether the path is clo...

Страница 175: ...alue Type What it is length number long Read only The number of elements in the SubPathItems collection parent object PathItem Read only The SubPathItems object s container typename string Read only T...

Страница 176: ...Value Type What it is alphaChannels boolean Read write Indicates whether to save the alpha channels resolution TargaBitsPerPixels Read write The number of bits per pixel default TargaBitsPerPixels TWE...

Страница 177: ...TextFonts collection Properties Property Value Type What it is family string Read only The font family name string Read only The name of the font parent object Application Read only The object s cont...

Страница 178: ...lled on the machine Correct alert app fonts length Incorrect alert app TextFonts length See Application specifically the fonts property for more information Properties Methods Property Value Type What...

Страница 179: ...CS3 Help for more information antiAliasMethod AntiAlias Read write The method of anti aliasing to use autoKerning AutoKernType Read write The auto kerning option to use autoLeadingAmount number doubl...

Страница 180: ...age of space between words 0 1000 at 100 no additional space is added between words Note Valid only when justification Justification CENTERJUSTIFIED Justification FULLYJUSTIFIED Justification LEFTJUST...

Страница 181: ...words hyphenateWordsLongerThan number long Read write The minimum number of letters a word must have in order for hyphenation in word wrap to be allowed 2 25 hyphenation boolean Read write Indicates...

Страница 182: ...ce to allow between letters 100 500 at 0 no space is added between letters Note Valid only when justification Justification CENTERJUSTIFIED Justification FULLYJUSTIFIED Justification LEFTJUSTIFIED or...

Страница 183: ...fication FULLYJUSTIFIED Justification LEFTJUSTIFIED or Justification RIGHTJUSTIFIED See justification The following values are also required maximumLetterScaling and desiredLetterScaling minimumWordSc...

Страница 184: ...ead write The composition method to use to evaluate line breaks and optimize the specified hyphenation and justification options Note Valid only when kind TextType PARAGRAPHTEXT See kind tracking numb...

Страница 185: ...e vertical distortion as percentage of the warp 100 100 width UnitValue Read write The width of the bounding box unit value for paragraph text Note Valid only when kind TextType PARAGRAPHTEXT See kind...

Страница 186: ...ls boolean Read write Indicates whether the channels in the image will be interleaved jpegQuality number long Read write The quality of the produced image 0 12 which is inversely proportionate to the...

Страница 187: ...in an XMP file in the same folder as the RAW file with the same base name and an XMP extension Properties Property Value Type What it is parent object Document Read only The object s container rawData...

Страница 188: ...edges by softening the color transition between edge pixels and background pixels AutoKernType MANUAL METRICS OPTICAL The type of kerning to use for characters BatchDestinationType FOLDER NODESTINATI...

Страница 189: ...EEN THIRTYTWO TWENTYFOUR The number of bits per channel also called pixel depth or color depth The number selected indicates the exponent of 2 For example a pixel with a bit depth of EIGHT has 28 or 2...

Страница 190: ...ed area SELECTEDAREA Alpha channel where color indicates selected are SPOTCOLOR Alpha channel to store a spot color ColorBlendMode BEHIND CLEAR COLOR COLORBURN COLORDODGE DARKEN DIFFERENCE DISSOLVE EX...

Страница 191: ...hen cropping a page DCSType COLORCOMPOSITE GRAYSCALECOMPOSITE NOCOMPOSITE The DCS format to use COLORCOMPOSITE Creates a color composite file in addition to DCS files GRAYSCALECOMPOSITE Creates a gray...

Страница 192: ...NONLY The history log edit options CONCISE Save a concise history log DETAILED Save a detailed history log SESSIONONLY Save history log only for the session ElementPlacement INSIDE PLACEATBEGINNING PL...

Страница 193: ...afe colors FormatOptions OPTIMIZEDBASELINE PROGRESSIVE STANDARDBASELINE The option with which to save a JPEG file OPTIMIZEDBASELINE Optimized color and a slightly reduced file size PROGRESSIVE Display...

Страница 194: ...SQUARE TRIANGLE Geometric options for shapes such as the iris shape in the Lens Blur Filter GridLineStyle DASHED DOTTED SOLID The line style for the nonprinting grid displayed over images GridSize LA...

Страница 195: ...DIENTFILL GRADIENTMAP HUESATURATION INVERSION LEVELS NORMAL PATTERNFILL PHOTOFILTER POSTERIZE SELECTIVECOLOR SMARTOBJECT SOLIDFILL TEXT THRESHOLD LAYER3D VIDEO The kind of artLayer object Note You can...

Страница 196: ...CMYK GRAYSCALE LAB RGB The color profile to use OpenDocumentType ALIASPIX BMP CAMERARAW COMPUSERVEGIF DICOM ELECTRICIMAGE EPS EPSPICTPREVIEW EPSTIFFPREVIEW FILMSTRIP JPEG PCX PDF PHOTOCD PHOTOSHOP PH...

Страница 197: ...ACT LOCALADAPTIVE LOCALPERCEPTUAL LOCALSELECTIVE MACOSPALETTE MASTERADAPTIVE MASTERPERCEPTUAL MASTERSELECTIVE PREVIOUSPALETTE UNIFORM WEBPALETTE WINDOWSPALETTE The palette type to use PathKind CLIPPIN...

Страница 198: ...be Photoshop CS3 Kodak PhotoCD is now found in the Goodies folder on the Adobe Photoshop CS3 Install DVD PICTBitsPerPixels EIGHT FOUR SIXTEEN THIRTYTWO TWO The number of bits per pixel to use when com...

Страница 199: ...PIN ZOOM The blur method to use RadialBlurQuality BEST DRAFT GOOD The smoothness or graininess of the blurred image RasterizeType ENTIRELAYER FILLCONTENT LAYERCLIPPINGPATH LINKEDLAYERS SHAPE TEXTCONTE...

Страница 200: ...FILEANDMETADATA METADATA The location of history log data SaveOptions DONOTSAVECHANGES PROMPTTOSAVECHANGES SAVECHANGES The save method to use when closing a document SelectionType DIMINISH EXTEND INTE...

Страница 201: ...itsPerPixels SIXTEEN THIRTYTWO TWENTYFOUR The resolution to use when saving an image in Targa format TextCase ALLCAPS NORMAL SMALLCAPS The case usage for type TextComposer ADOBEEVERYLINE ADOBESINGLELI...

Страница 202: ...use to transition from one image to the next in a PDF presentation TrimType BOTTOMRIGHT TOPLEFT TRANSPARENT Type of pixels to trim around an image BOTTOMRIGHT bottom right pixel color TOPLEFT top lef...

Страница 203: ...twork WarpStyle ARC ARCH ARCLOWER ARCUPPER BULGE FISH FISHEYE FLAG INFLATE NONE RISE SHELLLOWER SHELLUPPER SQUEEZE TWIST WAVE The warp style to use WaveType SINE SQUARE TRIANGULAR The type of wave to...

Страница 204: ...avascriptresource The resource definition tag name The command name that appears in the Photoshop menu If this tag is not provided in the resource the name of the command in the menu defaults to the n...

Страница 205: ...use this expression to enable or disable the menu item based on various characteristics of the document The Enable Info grammar is as follows category The category the command appears within in the m...

Страница 206: ...erator relationOperator inFunction in simpleExpression simpleExpression Operator Description Or And Addition or subtraction Multiply or divide Less than less than or equal greater than or equal greate...

Страница 207: ...YK64Mode CMYK mode 16 bits per channel DeepMultichannelMode Deep multichannel mode Duotone16Mode Duotone mode 16 bit depth RGB96Mode RGB color mode 32 bits per channel Gray32Mode Grayscale mode 32 bit...

Страница 208: ...x for an example of a script that can record and be automated by scripting parameters Terminology Dictionary The JavaScript resource provides a terminology tag that allows you to provide the terminolo...

Страница 209: ...in the following table eventName String event name direct parameter type parameterName String name parameter type Name used in string based API required optional if omitted no parameter optional para...

Страница 210: ...all other names All enumeration type names must be different from all other enumeration type names All keys must be different from all other keys used in the same class or event All enumeration value...

Страница 211: ...numeration annotType has three values annotUnknown annotText and annotSound terminology CDATA Version 1 Events newAnnot New Annotation annotType Type annotType at At Point size Size annotSizeClass Cla...

Страница 212: ...require double quotes in the code Tip If you can t find the event you want to use for notification in this table you can use ScriptListener to determine the event ID code See the ScriptListener docum...

Страница 213: ...ontactSheet 0B71D221 F8CE 11d2 B21B 0008C75B322C ConteCrayon CntC Contract Cntc ConvertMode CnvM Copy copy CopyEffects CpFX CopyMerged CpyM CopyToLayer CpTL Craquelure Crql CreateDroplet CrtD Crop Cro...

Страница 214: ...DryBrush DryB Duplicate Dplc DustAndScratches DstS Emboss Embs Equalize Eqlz Exchange Exch Expand Expn Export Expr Jumpto Jpto ExportTransparentImage 02879e00 cb66 11d1 bc43 0060b0a13dc4 Extrude Extr...

Страница 215: ...aP Group GrpL Grow Grow HalftoneScreen HlfS Hide Hd HighPass HghP HSBHSL HsbP HueSaturation HStr ImageSize ImgS Import Impr InkOutlines InkO Intersect Intr IntersectWith IntW Inverse Invs Invert Invr...

Страница 216: ...CColors NTSC NeonGlow NGlw Next Nxt NotePaper NtPr Notify Ntfy Null typeNull OceanRipple OcnR Offset Ofst Open Opn Paint Pnt PaintDaubs PntD PaletteKnife PltK Paste past PasteEffects PaFX PasteInto Ps...

Страница 217: ...rizeTypeSheet RstT RemoveBlackMatte RmvB RemoveLayerMask RmvL RemoveWhiteMatte RmvW Rename Rnm ReplaceColor RplC Reset Rset ResizeImage 1333cf0c cb67 11d1 bc43 0060b0a13dc4 Reticulation Rtcl Revert Rv...

Страница 218: ...es SprS StainedGlass StnG Stamp Stmp Stop Stop Stroke Strk Subtract Sbtr SubtractFrom SbtF Sumie Smie TakeMergedSnapshot TkMr TakeSnapshot TkSn TextureFill TxtF Texturizer Txtz Threshold Thrs Tiles Tl...

Страница 219: ...hotoshop CS3 JavaScript Scripting Reference Appendix A Event ID Codes 219 WaterPaper WtrP Watercolor Wtrc Wave Wave Wind Wnd ZigZag ZgZg BackLight BacL FillFlash FilE ColorCast ColE Event 4 char ID or...

Страница 220: ...defaults 158 location 46 preferences 158 artLayers See layers Asian text 161 authors 98 auto kerning 179 188 auto leading 184 auto spacing contact sheets 82 available memory 45 Average filter 55 B bac...

Страница 221: ...60 component channels color balance 54 defined 72 listing 89 See composite channels composite channels 72 See component channels Compuserve GIF documents opening 196 saving 115 contact sheets captions...

Страница 222: ...l filter names Folder object 31 fonts detecting 45 determining family of 177 determining style of 177 PostScript name of 177 formats see individual document formats G galleries 112 background color 10...

Страница 223: ...aving 122 JPEG options scans 122 JPEGSaveOptions 122 justification 181 K kerning 179 text auto kerning 188 keyboard behavior 160 L LabColor 123 languages 181 layer comps 124 adding 126 applying 124 in...

Страница 224: ...e 183 opacity channels 72 gallery security text 113 layer fill 53 layer sets 128 layers 54 picture packages 155 open options Camera Raw format 70 DICOM format 88 EPS format 103 PDF format 147 Photo CD...

Страница 225: ...s opening 196 saving 152 purging 49 Q quote style 161 R Radial Blur filter 58 rasterize 62 rasterizing document layers 94 RAW documents opening 163 RawSaveOptions 164 render filters Clouds 55 Differen...

Страница 226: ...rmatting 184 gallery security 113 194 hyphenation 181 in picture packages 155 justification 181 languages 181 offset 179 orientation 180 spacing 180 183 tracking 184 wrapping 181 text composer 184 tex...

Страница 227: ...Adobe Photoshop CS3 JavaScript Scripting Reference Index 227 X XML 187 xmp metadata 91 187 Z Zigzag filter 59 60 zoom 160...

Страница 228: ...Adobe Photoshop CS3 JavaScript Scripting Reference Index 228...

Страница 229: ...Adobe Photoshop CS3 JavaScript Scripting Reference Index 229...

Отзывы: