Methods 4
Adjusts the brightness -100 - 100 and contrast -100 - 100 . Shadows , Midtones , Highlights , PreserveLuminosity array of Numbers array of Numbers array of Numbers Boolean Adjusts the color balance of the layer's component channels. For Shadows, Midtones, and Highlights, the array must include three values -100 - 100 , which represent cyan or red, magenta or green, and yellow or blue, when the document mode is CMYK or RGB. Note See mode in the Properties table of the Document object. Array of...
Properties 22
Read-only. The application that the collection belongs to. Read-write. Applies blur to the image to reduce artifacts. Default 0.0. Read-write. The color reduction algorithm. Default 1 psSelective . Read-write. The number of colors in the palette. Default 2 56. Read-write. The type of dither. Default 2 Read-write. The amount of dither. Default 100. Note Valid only when Dither 2. See Dither. Read-write. The file format to use. Default 3 Read-write. Indication of whether to include the document's...
Appendix A: Event ID Codes
The following table lists events and their four-character ID codes or string identifiers for use with the Notifier object. Note Do not include single quotes 1 with four-character IDs in your code. The single quotes are used in this table to illustrate the placement of required spaces in codes that do not contain four letters. However, string identifiers, which are longer than four characters, require double quotes in the code.
Methods 15
Gets an element from the LayerSets collection. Removes the layer set, and any layers or layer sets it contains, from the document. The following script creates three layer sets, then nests a second layer set in each layer set, and then creates a text layer in each nested set that displays the text Layer in n Set Inside n Set, where n represents the ordinal number of the set first, second, or third . Dim appRef, docRef, myLayerSets 3,3 , textArray, i, myLayers 3 Set appRef 'close all open...
Methods 18
Duplicates this PathItem object with the new name specified in the argument. , PreserveTransparency , Feather , WholePath , AntiAlias Object SolidColor, ArtLayer, HistoryState or Fills the area enclosed by the path Opacity 0 - 100 as percent Feather 0.0 -250.0 in pixels . PsColorBlendMode Number Double Boolean Makes this PathItem object the clipping path for this document the optional parameter tells the PostScript printer how to approximate curves in the path 0.2 - 100 . Feather , AntiAlias ,...
ActionList
The list of commands that comprise an Action such as an Action created using the Actions palette in the Adobe Photoshop CS2 application . Note The actionList object is part of the Action Manager functionality. For details on using the Action Manager, see 'Action Manager' on page 145. Read-only. The application that the collection belongs to. Read-only. The number of commands that comprise the action. Read-only. The class name of the referenced With the exception of the ciear method, you use the...
Installing ScriptListener
The ScriptListener plug-in is located in the Adobe Photoshop CS2 Scripting Guide Utilities folder. gt To install the ScriptListener 1. Select the file ScriptListener.8li and then choose Edit gt Copy. 2. Paste the file copy to the following location Adobe Photoshop CS Plug-Ins Adobe Photoshop Only Automate Note If Adobe Photoshop CS2 is already open, close it and then start it again. gt To uninstall the ScriptListener 2. Verify that a copy of the file ScriptListener.8li still exists in the Adobe...
Properties 40
Read-write. Indicates whether the contents in the layers contained in the LayerSet object are editable. Read-only. The application that the collection belongs to. Read-only. When LayerType 1 psArtLayer , this property returns a reference to the corresponding LayerSet object. See LayerType. Read-only. The ArtLayers in this LayerSet. Read-write. The blend mode to use for the layer set. Read-only. The bounding rectangle of the layer set. Read-write. The channels enabled for the layer set must be a...
Running JavaScript based Action Manager code from VBScript
You can also access JavaScript-based Action Manager code from a VBScript using the DoJavaScriptFile command. See 'DoJavaScriptFile' on page 18 for more information. gt To execute JavaScript-based Action Manager code from a VBScript 1. Save the following script in a file called C Emboss.jsx function emboss angle, height, amount var id3 2 charIDToTypeID Embs var desc7 new ActionDescriptor var id3 3 charIDToTypeID Angl desc7.putInteger id33, angle var id3 4 charIDToTypeID Hght desc7.putInteger...
Using the Action Manager from a VBS Script
The section demonstrates how to create the ScriptingListenerVB.log log file and use its contents to create your script. The procedures in this section uses the Action Manager to make the Emboss filter available to the scripting interface. By default, the Emboss filter is available only via the Adobe Photoshop CS2 interface. Note ScriptListener must be installed in the Automate folder before you begin the following procedure. See Installing ScriptListener. gt To make the Emboss filter scriptable...
Properties 16
Read-write. The history state to use with the history brush. Read-write. The selected HistoryState object. Read-only. The application that the collection belongs to. Read-only. The ArtLayers collection. Read-only. Indicates whether the layer is a background layer. Read-write. The number of bits per channel. Read-write. The Channels collection. Read-write. The name of the color profile. ColorProfileType 3 or ColorProfileType 2. See ColorProfileType. Read-write. The type of color model that...
Methods 7
Removes all Channel objects from the Channels collection. The following script checks for any open documents files if no documents are open, it opens eagle .psd in the Samples folder. The script then creates the histogram for each channel in the document and creates a log file named Histogram.log on your C drive. The file maps out the histogram for each channel and includes the following information Standard deviation of pixels per row Pixel count row by row, represented in rows of Xs, produces...
Methods 20
Clears the selection and does not copy it to the clipboard. Contracts the selection by the specified amount. Copies the selection to the clipboard. When the optional argument is used and set to true, a merged copy is performed all visible layers in the selection are copied . Clears the current selection and copies it to the clipboard. Expands the selection by the specified amount. Feathers the edges of the selection by the specified amount. Object SolidColor, ArtLayer, HistoryState Fills the...
Working with the Properties Tables
The Properties table for an object lists the following The properties you can use with the object The value type for each property When the value type is a constant or another object, the value is a hypertext link to the constant's or object's listing, as in the following 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. Read-write. Controls whether or not Adobe...
Properties 59
Read-write. The path to an additional plug-in folder. UseAdditionalPluginFolder true. See Read-write. Save files with extensions on Windows. Read-only. The application that the collection belongs to. Read-write. Indication of whether to ask the user to verify layer preservation options when saving a file in TIFF format. Read-write. Indication of whether to automatically update open documents. Read-write. Indication of whether to beep when a process finishes. Read-write. Indication of whether to...
Methods 3
Runs the batch automation routine similar to the Batch command, or File gt Automate gt Batch in the Adobe Photoshop CS2 application . parameter specifies the source for the files to be Sets Color Settings to a named set or to the contents of a settings file. Converts from a four character code character ID to a runtime ID. Plays an action from the Actions palette. JavaScriptCode, , Arguments , ExecutionMode Executes the specified JavaScript code. JavaScriptCode, , Arguments , ExecutionMode...
Changes Since Earlier Versions
The following changes have been made to the VBScript object model and language support in Adobe Photoshop CS2 The emphasis has shifted from Visual Basic to VBScript with this version of Adobe Photoshop CS2. The following classes have been added to the VBScripting interface cameraRawOpenOptions, which you use to specify options when opening a document in Camera Raw format. ExportoptionsSaveForWeb, which you use to optimize documents for the Web. ContactSheetOptions, which you use to create and...
Methods 8
P sChangeMode object BitmapConversionOptions or Closes the document. When the optional parameter is used, the document. Default 3 , BlackPointCompensation , Dither Changes the color profile. Note The DestinationProfile parameter must be either a string that names the color mode or Working RGB, Working CMYK, Working Gray, Lab Color meaning one of the working color spaces or Lab color Bounds , Angle , Width , Height Array UnitValue Number Double UnitValue UnitValue Crops the document. The first...
4 Scripting Constants
This section lists and describes the enumerations defined for use with Adobe Photoshop CS2 VBScript properties and methods. Method to use for interpreting selective color adjustment specifications 1 of the existing color amount 2 of the whole. The point on the object that does not move when the object is rotated or resized. Method to use to smooth edges by softening the color transition between edge pixels and background pixels. The type of kerning to use for characters. 2 Save changes and...
Methods 14
RelativeObject , InsertionLocation Creates a duplicate of the LayerSet object. Links the layer set with another layer. Merges the layerset returns a reference to the art layer created by this method. RelativeObj ect, InsertionLocat ion Horizontal , Vertical , Anchor Number Double Number Double PsAnchorPosition Resizes all layers in the layer set to the specified dimensions as a percentage of its current size and places the layer set in the specified position. Rotates all layers in the layer...
Properties 70
Read-write. Indication of whether to save the alpha channels. Read-only. The application that the collection belongs to. Read-write. The number of bits per pixel. Default 24. Read-write. Indicates whether RLE compression should be used. Default true. Read-only. The class name of the referenced
Properties 51
Read-write. Indication of whether to use antialias. Read-only. The application that the collection belongs to. Read-write. The number of bits per channel. Read-write. The method of cropping to use. Read-write. The name of the document. Read-write. The page to which to open the document. Read-write. The resolution of the document in pixels per inch . Read-write. Indication of whether to suppress warnings when opening the document. Read-only. The class name of the referenced Read-write....