Adobe Smoke Alarm CS3 Manual De Usuario

Descargar
Página de 85
     7
2
Photoshop CS3
 
Scripting Basics
This chapter provides an overview of scripting for Photoshop, describes scripting support for the scripting 
languages AppleScript, VBScript, and JavaScript, how to execute scripts, and covers the Photoshop CS3 
object model. It provides a simple example of how to write your first Photoshop CS3 script.
If you are familiar with scripting or programming languages, you most likely will want to skip much of this 
chapter. Use the following list to locate information that is most relevant to you.
For more information on the Photoshop CS3 object model, see 
For information on selecting a scripting language, refer to the Introduction to Scripting guide.
For examples of scripts created specifically for use with Photoshop CS3, see Chapter 3, 
For detailed information on Photoshop CS3 objects and commands, please use the reference 
information in the three reference manuals provided with this installation: Adobe Photoshop CS3 
AppleScript Scripting Reference
Adobe Photoshop CS3 Visual Basic Scripting Reference, and Adobe 
Photoshop CS3 JavaScript Scripting Reference
.
Note:
You can also view information about the Photoshop CS3 objects and commands through the object 
browsers for each of the three scripting languages. See 
.
Scripting Overview
A script is a series of commands that tells Photoshop CS3 to perform a set of specified actions, such as 
applying different filters to selections in an open document. These actions can be simple and affect only a 
single object, or they can be complex and affect many objects in a Photoshop CS3 document. The actions 
can call Photoshop CS3 alone or invoke other applications.
Scripts automate repetitive tasks and are often used as a creative tool to streamline tasks that might be too 
time consuming to do manually. For example, you could write a script to generate a number of localized 
versions of a particular image or to gather information about the various color profiles used by a collection 
of images.
If you are new to scripting, you should acquaint yourself with the basic scripting information provided in 
the Introduction to Scripting manual.
Why use scripts instead of actions?
If you’ve used Photoshop CS3 Actions, you’re already familiar with the enormous benefits of automating 
repetitive tasks. Scripting allows you to extend those benefits by allowing you to add functionality that is 
not available for Photoshop CS3 Actions. For example, you can do the following with scripts and not with 
actions:
You can add conditional logic, so that the script automatically makes “decisions” based on the current 
situation. For example, you could write a script that decides which color border to add depending on 
the size of the selected area in an image: “If the selected area is smaller than 2 x 4 inches, add a green 
border; otherwise add a red border.”