Adobe Smoke Alarm CS3 Manuale Utente

Pagina di 85
Photoshop CS3
Adobe Photoshop CS3  Scripting Guide
 Photoshop CS3 Scripting Basics     8
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
®
 CS3, in the same script.
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 
You can call JavaScript scripts from AppleScript and VBScript scripts. See 
For a file to be recognized by Photoshop as a valid script file it must have the correct file name extension:
JavaScript Support
For a JavaScript file to be recognized by Photoshop as a valid script file, it must use either a 
.js 
or a 
.jsx 
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 
.js
 
and 
.jsx 
extension. However, if the script is launched by double-clicking on it, a script with the 
.js 
extension is interpreted with the Microsoft JScript engine, and it cannot launch Photoshop CS3. For 
Windows, using the 
.jsx 
extension is preferable, since it interprets the script with the ExtendScript 
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. 
Script Type
File Type
 Extension
Platform
AppleScript
compiled script 
OSAS file 
.scpt 
(none)
Mac OS®
JavaScript
ExtendScript
text 
.js
.jsx
Mac OS & Windows
VBScript
text 
.vbs
Windows
Visual Basic
executable
.exe
Windows