Adobe 23101764 Scripting Guide - Page 86
De, ning selections
UPC - 718659340025
View all Adobe 23101764 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 86 highlights
Scripting Photoshop 3 Selections For example, you may apply effects to a selection or copy the current selection to the clipboard. But remember that you may have to set the active layer before acting on the selection. Here's how: AS: set current layer of current document to layer "Layer 1" of ¬ current document VB: docRef.ActiveLayer = docRef.Layers("Layer 1") JS: docRef.activeLayer = docRef.layers["Layer 1"]; See section 3.10.1, "Setting the Active layer" on page 75 for more information. 3.12.1 Defining selections To create a new selection, use the select method with a type of replaced (psReplaceSelection/SelectionType.REPLACED). The other selection types are diminished, extended and intersected. The diminished type shrinks the current selection, the extended selection type expands the current selection, and the intersected type finds the intersection of the current selection and the new selection and replace the current selection with the intersection of the two. If there is no intersection between the selections, the new selection will be empty. If there is no current selection, the new selection will be the newly specified selection. Here are examples of how to replace the current selection: AS: select current document region {{ 5, 5}, {5, 100}, ¬ { 80, 100}, { 80, 5}} combination type replaced Photoshop CS Scripting Guide 82