Adobe 23102480 Scripting Guide - Page 41
Working with Selection Objects, Creating and Defining a Selection
UPC - 883919080222
View all Adobe 23102480 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 41 highlights
Adobe Photoshop CS3 Scripting Guide Photoshop CS3 Scripting Photoshop CS3 41 (psParagraphText/TextType.PARAGRAPHTEXT. ) When a new text-object is created, its kind property is automatically set to point text. The text-object properties height, width, and leading are valid only when the text item's kind property is set to paragraph text. To familiarize yourself with this objects, properties, and commands in the scripting references, do the following: ● In the Adobe Photoshop CS3 AppleScript Scripting Reference or in the Photoshop CS3 AppleScript Dictionary, look up the text-object properties and methods. ● In the Adobe Photoshop CS3 Visual Basic Scripting Reference, or in the Visual Basic Object Browser look up the TextItem property of the ArtLayer object. To find the properties and methods you can use with a text layer, look up the TextItem object. ● In the Adobe Photoshop CS3 JavaScript Scripting Reference, or in the ExtendScript Object Model Viewer, look up the textItem property of the ArtLayer object. To find the properties and methods you can use with a text layer, look up the TextItem object. Working with Selection Objects You use a Selection object to allow your scripts to act only on a specific, selected section of your document or a layer within a document. For example, you can apply effects to a selection or copy the current selection to the clipboard. The Selection object is a property of the Document object. Look up the following for more information: ● In the Adobe Photoshop CS3 AppleScript Scripting Reference or in the Photoshop CS3 AppleScript Dictionary, look up the command select. Also, look up the selection property of the Document object, and the selection-object. ● In the Adobe Photoshop CS3 Visual Basic Scripting Reference, or in the Visual Basic Object Browser, look up Selection as a property of the Document object. Also, look up the Select as a method of the Selection object. ● In the Adobe Photoshop CS3 JavaScript Scripting Reference, or in the ExtendScript Object Model Viewer, look up selection as a property of the Document object. Also, look up the select as a method of the Selection object. Note: You cannot create a new Selection object. The property selection (Selection/selection) on the Document object contains a pre-existing selection object for the document. Use the select (Select/select) command to specify the area for the selection. Creating and Defining a Selection To create a selection, you use the select/Select/select() command of the Selection object. You define a selection by specifying the coordinates on the screen that describe the selection's corners. Since your document is a 2-dimensional object, you specify coordinates using the x-and y-axes as follows: ● You use the x-axis to specify the horizontal position on the canvas. ● You use the y-axis to specify the vertical position on the canvas. The origin point in Photoshop CS3, that is, x-axis = 0 and y-axis = 0, is the upper left corner of the screen. The opposite corner, the lower right, is the extreme point of the canvas. For example, if your canvas is 1000 x 1000 pixels, then the coordinate for the lower right corner is x-axis = 1000 and y-axis = 1000. You specify coordinate points that describe the shape you want to select as an array, which then becomes the argument or parameter value for the select/Select/select() command.