Photoshop CS2
Adobe Photoshop CS2 Scripting Guide
Scripting Photoshop CS2 83
Note:
Look up the
motion blur class
in the
Adobe AppleScript Scripting Reference
to see if you
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
HelloWorldDoc
just above the commented statements that
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
ArtLayer
class >
ApplyMotionBlur()
method in the
Adobe VBScript Scripting
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
HelloWorldDoc
just above the commented statements that
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 CS 2.0 - SCRIPTING GUIDE
Страница 1: ...bbc Adobe Photoshop cs 2 Scripting Guide ...