Scripting Support In Photoshop Cs3; Javascript Support - Adobe 23102480 - Photoshop CS3 - PC Programming Manual

Scripting guide
Table of Contents

Advertisement

Adobe Photoshop CS3 Scripting Guide
A single script can perform actions that involve multiple applications. For example, depending on the
scripting language you are using, you could target both Photoshop CS3 and another Adobe Creative
Suite 3 Application, such as Illustrator
You can open, save, and rename files using scripts.
You can copy scripts from one computer to another. If you were using an Action and then switched
computers, you'd have to recreate the Action.
Scripts provide more versatility for automatically opening files. When opening a file in an action, you
must hard code the file location. In a script, you can use variables for file paths.
Note:
See Photoshop CS3 Help for more information on Photoshop CS3 Actions.

Scripting Support in Photoshop CS3

Photoshop CS3 supports scripting in three scripting languages: AppleScript, VBScript, and JavaScript.
AppleScript and JavaScript run on Mac OS, and JavaScript and VBScript run on Windows. For information
about how to choose which scripting language to use, and for additional information about using these
languages with Adobe applications, see Introduction to Scripting.
See
'Creating and Running an AppleScript' on page
'Creating and Running a JavaScript' on page
You can call JavaScript scripts from AppleScript and VBScript scripts. See
VBS' on page
For a file to be recognized by Photoshop as a valid script file it must have the correct file name extension:
Script Type
AppleScript
JavaScript
ExtendScript
VBScript
Visual Basic

JavaScript Support

For a JavaScript file to be recognized by Photoshop as a valid script file, it must use either a
extension. On the Mac OS, there is no difference in the way scripts with the two extensions function. On
Windows, if the script files is opened from inside Photoshop, there is no difference between using the
and
.jsx
extension is interpreted with the Microsoft JScript engine, and it cannot launch Photoshop CS3. For
Windows, using the
engine.
Scripts written in JavaScript can be accessed from the Adobe Photoshop CS3 Scripts menu (File > Scripts),
which provides quick and easy access to your JavaScripts. By putting a JavaScript file into the appropriate
location on disk, it can be accessed directly from the Photoshop CS3 menu.
9.
File Type
compiled script
OSAS file
text
text
executable
extension. However, if the script is launched by double-clicking on it, a script with the
extension is preferable, since it interprets the script with the ExtendScript
.jsx
Photoshop CS3
®
CS3, in the same script.
15,
'Creating and Running a VBScript' on page
17.
Extension
.scpt
(none)
.js
.jsx
.vbs
.exe
Photoshop CS3 Scripting Basics
'Executing JavaScripts from AS or
Platform
Mac OS®
Mac OS & Windows
Windows
Windows
8
16, and
or a
.js
.jsx
.js
.js

Advertisement

Table of Contents
loading

This manual is also suitable for:

13102498 - photoshop cs3 - macPhotoshop cs3

Table of Contents