Adobe PHOTOSHOP CS 2.0 - SCRIPTING GUIDE Manual page 87

Table of Contents

Advertisement

Adobe Photoshop CS2 Scripting Guide
Note:
Look up the
understand how you used it in this script:
VBS
To apply a motionblur filter to HelloWorldDoc:
1. Type the following code into the script file
restore original preferences.
docRef.Selection.Select Array(Array(docWidthInPixels / 2, 0), _
Array(docWidthInPixels, 0), _
Array(docWidthInPixels, docHeightInPixels), _
Array(docWidthInPixels / 2, docHeightInPixels), _
Array(docWidthInPixels / 2, 0))
newTextLayer.ApplyMotionBlur 45, 5
docRef.Selection.Deselect
2. Delete the straight single quotes from the commented statements above the end tell statement as
follows:
app.Preferences.RulerUnits = startRulerUnits
app.Preferences.TypeUnits = startTypeUnits
3. Choose Run > Run Sub/Userform or press F5 to run the script.
Note:
Look up the
Reference to see if you understand how you used it in this script:
JS
To apply a motionblur filter to HelloWorldDoc:
1. Type the following code into the script file
restore original preferences.
//change the value of selRegion to the other half of the document
selRegion = Array(Array(docWidthInPixels / 2, 0),
Array(docWidthInPixels, 0),
Array(docWidthInPixels, docHeightInPixels),
Array(docWidthInPixels / 2, docHeightInPixels),
Array(docWidthInPixels / 2, 0))
docRef.selection.select(selRegion)
newTextLayer.applyMotionBlur(45, 5)
docRef.selection.deselect()
2. Delete the slashes from the commented statements above the end tell statement as follows:
app.preferences.rulerUnits = startRulerUnits
app.preferences.typeUnits = startTypeUnits
3. Save the script, and then open Photoshop CS2 and select the script from the Scripts menu (choose File
> Script > HelloWorldDoc).
Photoshop CS2
in the Adobe AppleScript Scripting Reference to see if you
motion blur class
class >
ArtLayer
ApplyMotionBlur()
just above the commented statements that
HelloWorldDoc
method in the Adobe VBScript Scripting
just above the commented statements that
HelloWorldDoc
Scripting Photoshop CS2
83

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop cs2

Table of Contents