
Adobe Photoshop CS3
JavaScript Scripting Reference
JavaScript Resource 210
Predefined Class Types
Photoshop provides a number of predefined classes that are available for use in the terminology
dictionary. A useful subset of those classes is shown in the table below. Use these classes when they are
appropriate, but you can define new classes in the terminology resource, if necessary.
Uniqueness Rules for Terminology Entries
Generally, the names for terminology entries must be unique within a particular category and scope. It is
best to not make names unique unnecessarily; generic terms are prefereable, and if a name already exists
for something, go ahead and use it. Case matters in considering uniqueness of terminology entries.
The uniqueness rules for terminology entries are:
●
All event names must be different from all other event names.
●
All class names must be different from all other names.
●
All enumeration type names must be different from all other enumeration type names.
●
All keys must be different from all other keys used in the same class or event.
●
All enumeration values must be different from all other enumeration values in the same enumeration
type.
●
A class, event, enumeration type, key, and enumeration value can all have the same name.
Terminology Definition Example
This example demonstrates the terminology definition for a new event; the example uses ZStrings. The
event is called
newAnnot
, and it takes three parameters:
●
annotType
, an enumeration (
annotType
)
●
at
, a class (
point
), and
●
size
, a class (
annotSizeClass
).
typePaths
'Pth '
Windows file system path.
typePlatformFilePath
'alis'
or
'Pth
typeAlias
for Mac OS,
typePath
for Windows.
Name
Code
Description
classColor
'Clr '
Class for color classes.
classRGBColor
'RGBC'
keyRed, keyGreen, keyBlue
classCMYKColor
'CMYC'
keyCyan, keyMagenta, keyYellow, keyBlack.
classUnspecifiedColo
r
'UnsC'
Unspecified.
classGrayscale
'Grsc'
keyGray
classBookColor
'BkCl '
Book color
classLabColor
'LbCl'
keyLuminance, keyA, keyB.
Name
Code
Description