Adobe 23101335 - Photoshop - PC Manual page 88

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

Advertisement

Scripting Photoshop
3
Action Manager scripting
DIM id21
id21 = objApp.CharIDToTypeID( "Hght" )
Call desc4.PutInteger( id21, 3 )
DIM id22
id22 = objApp.CharIDToTypeID( "Amnt" )
Call desc4.PutInteger( id22, 100 )
Call objApp.ExecuteAction( id19, desc4 )
To make Emboss scriptable you must identify the filter values that you entered (135, 3 and
100). Copy the VBScript code from the "ScriptingListenerVB.log" file to an other file and
substitute the filter values with variable names. In the following we have wrapped the code in
a VBScript sub-routine and replaced 135 with Angle, 3 with Height, and 100 with Amount.
Sub Emboss( Angle, Height, Amount )
DIM objApp
SET objApp = CreateObject("Photoshop.Application")
DIM id19
id19 = objApp.CharIDToTypeID( "Embs" )
DIM desc4
SET desc4 = CreateObject( "Photoshop.ActionDescriptor" )
DIM id20
id20 = objApp.CharIDToTypeID( "Angl" )
Call desc4.PutInteger( id20, Angle )
DIM id21
id21 = objApp.CharIDToTypeID( "Hght" )
Call desc4.PutInteger( id21, Height )
DIM id22
id22 = objApp.CharIDToTypeID( "Amnt" )
Call desc4.PutInteger( id22, Amount )
Call objApp.ExecuteAction( id19, desc4 )
End Sub
REM Now run the Emboss filter by invoking the Emboss sub-routine
Call Emboss( 135, 3, 98 )
If you save the code shown above in a file with an extension of "vbs" you can activate the
Emboss filter by double clicking on the file.
To include the Emboss functionality into an existing script, copy the sub-routine into your
other VBScript and activate the Emboss functionality by invoking the "Emboss" sub-routine
with the appropriate arguments.
88
Photoshop 7.0 Scripting Guide

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop 7.0

Table of Contents