Adobe 23101335 - Photoshop - PC Manual page 86

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

Advertisement

}
// Then call emboss with desired parameters
emboss( 75, 2, 89 );
Running JavaScript based Action Manager code from AppleScript
As there is no Action Manager functionality in AppleScript you will have to use JavaScript to
use the Action Manager on the Mac. To do this you use the AppleScript command: "do
javascript." Provide filter settings in the "arguments" parameter.
You need to re-write your JavaScript code slightly to work with the "do javascript" command
to use the "arguments" collection to get access to the AppleScript values from JavaScript. For
example change the Emboss JavaScript shown in the previous section to the following and
save it in a file called "Emboss.js":
function emboss( angle, height, amount )
{
}
// Call emboss with values provided in the "arguments" collection
emboss( arguments[0], arguments[1], arguments[2] );
From AppleScript you can then run the Emboss filter by saying:
tell application "Photoshop 7.0"
end tell
Running JavaScript based Action Manager code from VBScript
From VBScript you have a choice of either running JavaScript based Action Manager code or
VBScript based Action Manager code. This section describes how to access JavaScript based
Photoshop 7.0 Scripting Guide
desc7.putInteger( id33, angle );
var id34 = charIDToTypeID( "Hght" );
desc7.putInteger( id34, height );
var id35 = charIDToTypeID( "Amnt" );
desc7.putInteger( id35, amount );
executeAction( id32, desc7 );
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 );
do javascript (file <a path to Emboss.js>) ¬
with arguments { 75,2,89 }
Scripting Photoshop
Action Manager scripting
3
86

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop 7.0

Table of Contents