Creating And Defining A Selection - Adobe 65014912 Manual

Photoshop cs4 extended
Table of Contents

Advertisement

C
3: Scripting Photoshop
HAPTER
The
Selection
In the Adobe Photoshop CS4 AppleScript Scripting Reference or in the Photoshop AppleScript Dictionary,
look up the command
selection-object
In the Adobe Photoshop CS4 Visual Basic Scripting Reference, or in the Visual Basic Object Browser, look
up
Selection
Selection
In the Adobe Photoshop CS4 JavaScript Scripting Reference, or in the ExtendScript Object Model Viewer,
look up
Selection
N
: You cannot create a new
OTE
the
Document
(Select/select)

Creating and defining a selection

To create a selection, you use the
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, 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
The following examples assume that the ruler units have been set to pixels and create a selection by:
1. Creating a variable to hold a new document that is 500 x 500 pixels in size.
2. Creating a variable to hold the coordinates that describe the selected area (that is, the
object).
3. Adding an array as the selection variable's value.
4. Using the
select an area. The area's coordinates are the selection variable's values.
AS
set docRef to make new document with properties {height:500, width:500}
set shapeRef to {{0, 0}, {0, 100}, {100, 100}, {100, 0}}
select current document region shapeRef
VBS
DocRef = appRef.Documents.Add
ShapeRef = Array(Array(0, 0), Array(0, 100), Array(100,100), Array(100,0))
docRef.Selection.Select ShapeRef
object is a property of the
. Also, look up the
select
.
as a property of the
object.
as a property of the
selection
object.
Selection
object contains a pre-existing selection object for the document. Use the
command to specify the area for the selection.
select/Select/select()
object's
Document
selection
object. Look up the following for more information:
Document
selection
object. Also, look up the
Document
object. Also, look up the
Document
object. The property
command of the
select/Select/select()
property, and the
Working with the Photoshop Object Model 43
property of the
Document
as a method of the
Select
select
selection (Selection/selection)
Selection
command.
object's
Selection
select
object, and the
as a method of the
on
select
object.
Selection
command to

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents