Executing Javascripts From As Or Vb - Adobe 23101335 - Photoshop - PC Manual

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

Advertisement

T
ABLE
AppleScript
translate boundary
(delta x, delta y)
3.5.3 Changing ruler and type units
The unit type settings of the two Photoshop rulers control how numbers are interpreted when
dealing with properties and parameters that support unit values. Be sure to set the ruler units as
needed at the beginning of your scripts and save and restore the original ruler settings when
your script has completed.
In AppleScript ruler units and type units are properties of the settings-object ,
accessed through the Application object's settings property as shown below.
set ruler units of settings to inch units
set type units of settings to pixel units
set point size of settings to postscript size
In Visual Basic and JavaScript ruler units and type units are properties of the
Preferences , accessed through the application object's preferences property as shown
below.
VB:
appRef.Preferences.RulerUnits = PsInches
appRef.Preferences.TypeUnits = PsTypePixels
appRef.Preferences.PointSize = PsPostScriptPoints
JS:
preferences.rulerUnits = Units.INCHES;
preferences.typeUnits = TypeUnits.PIXELS;
preferences.pointSize = PointType.POSTSCRIPT;
IMPO R TAN T:

3.6 Executing JavaScripts from AS or VB

With Photoshop's scripting support you can run JavaScripts from AppleScript or Visual Basic.
For Applescript, use do javascript .
Photoshop 7.0 Scripting Guide
3.3
Command Parameters
Visual Basic
Selection.TranslateBoundary
(DeltaX, DeltaY)
Remember to reset the unit settings back to the original values at the end of a
script.
Scripting Photoshop
Executing JavaScripts from AS or VB
JavaScript
selection.translateBoundary
(deltaX, deltaY)
3
48

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop 7.0

Table of Contents