Adobe 23102480 - Photoshop CS3 - PC Programming Manual page 76

Scripting guide
Table of Contents

Advertisement

Adobe Photoshop CS3 Scripting Guide
DIM id9
id9 = objApp.CharIDToTypeID( "Embs" )
DIM desc4
SET desc4 = CreateObject( "Photoshop.ActionDescriptor" )
DIM id10
id10 = objApp.CharIDToTypeID( "Angl" )
Call desc4.PutInteger( id10, 135 )
DIM id11
id11 = objApp.CharIDToTypeID( "Hght" )
Call desc4.PutInteger( id11, 3 )
DIM id12
id12 = objApp.CharIDToTypeID( "Amnt" )
Call desc4.PutInteger( id12, 100 )
Call objApp.ExecuteAction( id9, desc4, dialogMode )
Note:
ScriptListener separates logged commands with horizontal lines composed of equal signs (====...).
If this is not the first action recorded in the log, you can easily locate the most recent action; it
follows the final equal sign line.
2. Copy the VBScript code associated with the emboss action from
file, called
3. In the
the filter specification values with variable names.
In the following example,
has been replaced with
DIM objApp
SET objApp = CreateObject("Photoshop.Application")
REM Use dialog mode 3 for show no dialogs
DIM dialogMode
dialogMode = 3
DIM id9
id9 = objApp.CharIDToTypeID( "Embs" )
DIM desc4
SET desc4 = CreateObject( "Photoshop.ActionDescriptor" )
DIM id10
id10 = objApp.CharIDToTypeID( "Angl" )
Call desc4.PutInteger( id10, angle)
DIM id11
id11 = objApp.CharIDToTypeID( "Hght" )
Call desc4.PutInteger( id11, height )
DIM id12
id12 = objApp.CharIDToTypeID( "Amnt" )
Call desc4.PutInteger( id12, amount )
Call objApp.ExecuteAction( id9, desc4, dialogMode )
4. Wrap the code in a VBScript function. In the following example, the function name is
creation of the Photoshop application object needs to be outside of the function, as we will explain in
the next step.
DIM objApp
SET objApp = CreateObject("Photoshop.Application")
Function Emboss( angle, height, amount )
REM Use dialog mode 3 for show no dialogs
DIM dialogMode
dialogMode = 3
DIM id9
.
emboss.vbs
script, identify the values that you used with the filter (135, 3, and 100). Substitute
emboss.vbs
135
amount
Photoshop CS3
has been replaced with
.
ScriptListenerVB.log
,
has been replaced with
angle
3
Action Manager
76
to another
, and
height
100
. The
Emboss

Advertisement

Table of Contents
loading

This manual is also suitable for:

13102498 - photoshop cs3 - macPhotoshop cs3

Table of Contents