Running Javascript-Based Action Manager Code From Vbscript - Adobe 65014912 Manual

Photoshop cs4 extended
Table of Contents

Advertisement

C
4: Action Manager
HAPTER
Function Emboss( angle, height, amount )
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 )
End Function
6. Apply the emboss filter script by double clicking on the file
opens the file and applies the emboss filter to the file.

Running JavaScript-based Action Manager code from VBScript

You can also access JavaScript-based Action Manager code from a VBScript using the
method. Use the VBscript object browser for more information on the
method.
To execute JavaScript-based Action Manager code from a VBScript:
1. Follow steps 1-4 in
(
emboss.jsx
function emboss( angle, height, amount )
{
var id32 = charIDToTypeID( "Embs" );
var desc7 = new ActionDescriptor();
var id33 = charIDToTypeID( "Angl" );
desc7.putInteger( id33, angle );
var id34 = charIDToTypeID( "Hght" );
desc7.putInteger( id34, height );
var id35 = charIDToTypeID( "Amnt" );
desc7.putInteger( id35, amount );
executeAction( id32, desc7 );
}
2. At the end of the file
emboss function with arguments passed to it from an external invocation. See Introduction to Scripting
for more information about passing arguments from a VBScript to a JavaScript.
// Call emboss with values provided in the "arguments" collection
emboss( arguments[0], arguments[1], arguments[2] );
"Using the Action Manager from JavaScript" on page
) containing the following JavaScript code:
, add the following line of JavaScript code, which executes the
emboss.jsx
Running JavaScript-based Action Manager code from VBScript 79
emboss.vbs
Application
. This launches Photoshop,
DoJavaScriptFile
.
DoJavaScriptFile
75. You will end up with a file

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents