Choosing A Scripting Language - Adobe PHOTOSHOP CS 2.0 - SCRIPTING GUIDE Manual

Table of Contents

Advertisement

Adobe Photoshop CS2 Scripting Guide
JavaScript
You can write JavaScripts on either the Mac OS or Windows platform using any text editor. You must save
JavaScript files as text files with a
For more information, see

Choosing a scripting language

Your choice of scripting language is determined by two trade-offs:
1. Do you need to run the same script on both Macintosh and Windows computers?
If yes, you must create a JavaScript. See
2. Does the task you are scripting involve multiple applications (such as Photoshop CS2 and Illustrator
CS2 or a database program)?
If yes, you must create an AppleScript if you are using a Macintosh; you must create a VBScript script if
you are using Windows. See
Tip:
You can combine JavaScript's versatility with the platform-specific advantages of using either
AppleScript or VBScript by executing JavaScripts from your AppleScripts or VBScript scripts. See
'Executing JavaScripts from AS or VBS' on page 31
Note:
You can use other scripting languages, although they are not documented in this manual.
Legacy OLE Automation scripting
Photoshop CS2 supports legacy Automation scripting as long as you modify the way that you refer to the
Photoshop CS2
Set appRef = CreateObject("Photoshop.Application")
you must change the above code to read:
Set appRef = CreateObject("Photoshop.Application.9.1")
No other change is necessary for legacy COM scripts to run under Photoshop CS2.
Cross-platform scripts
Because JavaScripts performs identically on both Windows and Macintosh computers, it is considered a
cross-platform scripting language.
You run a JavaScript from within Photoshop CS2 by storing the script in the ...Presets\Scripts folder of your
Photoshop CS2 installation and then selecting the script from the File > Scripts menu.
Running JavaScripts from within Photoshop CS2 eliminates the scripts' facility to directly address other
applications. For example, you cannot easily write a JavaScript to manage a workflow that involves
Photoshop CS2 and a database management program.
'Creating and Running a JavaScript' on page
'Scripts that control multiple applications' on page
On Mac OS, you can use any language that allows you to send Apple events.
On Windows, you can use any OLE Automation-aware language.
object in your scripts. For example, instead of saying:
Application
Photoshop CS2
extension.
.jsx
'Cross-platform scripts' on page
for more information.
Introduction
24.
4.
5.
4

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PHOTOSHOP CS 2.0 - SCRIPTING GUIDE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Photoshop cs2

Table of Contents