Adobe 23101335 - Photoshop - PC Manual page 46

Scripting guide
Hide thumbs Also See for 23101335 - Photoshop - PC:
Table of Contents

Advertisement

Special unit value types
The unit values used by Photoshop Scripting Support 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 speaking, length values but are included because they are used
extensively by Photoshop for many operations and values.
N
O T E
3.5.2 Unit value useage
The following two tables list the properties of the classes and parameters of commands that are
defined to use unit values. Unit values for these properties and parameter, with the exception
of some text item properties, are based the graphics ruler setting.
T
ABLE
Object
Document
EPS open options
PDF open options
lens flare open
options
offset filter
Photoshop 7.0 Scripting Guide
In AppleScript you can get and set values as pixels or percent as you would any other
:
unit value type. You cannot, however, convert a pixel or percent value to another length
unit value as you can with other length value types. Trying to run the following script
will result in an error.
set pixelValue to pixels 72
-- Next line will result in a coercion error when run
set inchValue to pixelValue as inches
3.2
Object Properties
AppleScript
Properties
height
width
height
width
height
width
height
width
horizontal offset
vertical offset
Visual Basic
JavaScript
Properties
Properties
Height
height
Width
width
Height
height
Width
width
Height
height
Width
width
Height
height
Width
width
HorizontalOffset
horizontalOffset
VerticalOffset
verticalOffset
Scripting Photoshop
Working with units
3
46

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop 7.0

Table of Contents