Photoshop CS2
Adobe Photoshop CS2 Scripting Guide
Scripting basics 25
3. Do either of the following:
●
If Photoshop CS2 is already open, choose
File > Scripts > Browse
, and then navigate to the Presets
> Scripts folder and choose your script.
●
Start or restart Photoshop CS2, and then choose
File > Scripts
, and then select your script from the
Scripts
menu.
What’s Next
The remainder of this chapter provides information about general scripting tips and techniques.
Experienced AppleScript writers and VBScript and JavaScript programmers may want to skip to Chapter 3,
Scripting Photoshop CS2
for specifics on scripting Photoshop CS2.
Using Operators
Operators perform operations on variables or values and return a result. In the following table, the
examples use the following variables:
●
thisNumber =10
●
thisString = "Pride"
Comparison Operators
You can use a different type of operator to perform comparisons such as equal to, not equal to, greater
than, or less than. These are called
comparison operators
. Consult a scripting language guide, such as the
guides listed in this document’s
‘Bibliography’ on page 34
, for information on comparison operators.
Operator
Operation
Example
Result
+
add
thisNumber
+ 2
12
-
subtract
thisNumber
- 2
8
*
multiply
thisNumber
* 2
20
/
divide
thisNumber
/2
5
=
assign
thisNumber
= 10
10
+ (JS and
VBS only)
concatenate
a
a.
Concatenation operations combine two strings. Note that a space has been added at the
beginning of the string " and Prejudice"; without the space following the first enclosing quote,
the result would be:
Prideand Prejudice
thisString
+ " and
Prejudice"
Pride and Prejudice
& (AS and
VBS only)
concatenate
b
b.
See note a.
thisString
& " and
Prejudice"
Pride and Prejudice
Содержание PHOTOSHOP CS 2.0 - SCRIPTING GUIDE
Страница 1: ...bbc Adobe Photoshop cs 2 Scripting Guide ...