Working With Units - Adobe PHOTOSHOP CS 2.0 - SCRIPTING GUIDE Manual

Table of Contents

Advertisement

Adobe Photoshop CS2 Scripting Guide
VBS
In VBScript, you must use the
perform the merged copy, you must enter, or pass, the value
docRef.Selection.Copy True
Look up the
Photoshop CS2 Visual Basic Scripting Reference,
JS
In JavaScript, you must use the
parameter. To perform the merged copy, you must enter, or pass, the value
example.
docRef.selection.copy(true)
Look up the
Photoshop CS2 JavaScript Scripting Reference,

Working with Units

Photoshop CS2 provides two rulers for documents. You can set the measurement units for the rulers in
your script. The rulers are:
A graphics ruler used for most graphical layout measurements or operations on a document where
height, width, or position are specified.
You set measurement unit types for the graphics ruler using the
(RulerUnits/rulerUnits)
A type ruler, which is active when using the type tool
You set measurement unit types for the type ruler using the
property.
Note:
These settings correspond to those found in the Photoshop CS2 preference dialog under
Photoshop >Preferences > Units & Rulers on Mac OS or Edit >Preferences > Units & Rulers in
Windows.
Unit Values
All languages support plain numbers for unit values. These values are treated as being of the type
currently specified for the appropriate ruler.
For example, if the ruler units are currently set to inches and the following VBScript statement sets a
document's size to 3 inches by 3 inches:
docRef.ResizeImage 3,3
If the ruler units had been set to pixels, the document would be 3 pixels by 3 pixels. To ensure that your
scripts produce the expected results you should check and set the ruler units to the type appropriate for
your script. After executing a script the original values of the rule settings should be restored if changed in
the script. See
unit values.
Please refer to Photoshop CS2 Help for information about available unit value types.
Special Unit Value Types
The unit values used by Photoshop CS2 are length units, representing values of linear measurement.
Support is also included for pixel and percent unit values. These two unit value types are not, strictly
ArtLayer
method in the Methods table for the
Copy
ArtLayer
method in the Methods table for the
copy()
property.
'Setting Ruler And Type Units in a Script' on page 71
Photoshop CS2
or
object's
Selection
Copy
true
ArtLayer
or
object's
Selection
ArtLayer
Scripting Photoshop CS2
method with the
Merge
, as in the following example.
and
objects in the Adobe
Selection
method with the
copy()
, as in the following
true
and
objects in the Adobe
Selection
ruler units
type units (TypeUnits/typeUnits)
for directions on setting
68
parameter. To
merge

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop cs2

Table of Contents