Adobe 65010248 Scripting Guide - Page 18

Object-naming conventions, Top-level (containing) objects, Application

Page 18 highlights

CHAPTER 2: The Illustrator Scripting Object Model Object-naming conventions 18 Object-naming conventions There is one object model for the Illustrator scripting interface, but actual object names vary slightly in the different scripting languages: ➤ AppleScript names are lower case, and individual words are separated by a space; for example: graphic style ➤ VBScript names are capitalized, and additional words in the name are indicated by uppercase initial letters; for example: GraphicStyle ➤ JavaScript names begin with lowercase letters, and additional words in the name are indicated by uppercase initial letters; for example: graphicStyle This chapter uses generic object and property names, but you can easily apply these conventions to determine the corresponding language-specific names. Throughout this document, names of properties, methods, and object are in a monospaced font. Top-level (containing) objects Use these objects to access global information about the Illustrator application or an individual document. Application The properties of the application object give your script access to global values, such as: ➤ User preferences, which a user sets interactively in the Illustrator application by using the Preferences dialog (Edit > Preferences). ➤ System information like installed fonts (the text fonts property) and printers (the printer list property). Also, there are properties that provide application-specific information and higher-level information about any open documents: ➤ Application information like the installation path, version, and whether Illustrator is visible. ➤ The current active document; that is, the art canvas that is displayed and accepting user input. ➤ All open documents. The application object's methods or commands allow your script to perform application-wide actions; for example: ➤ Open files ➤ Undo and redo transactions ➤ Quit Illustrator

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57

C
HAPTER
2: The Illustrator Scripting Object Model
Object-naming conventions
18
Object-naming conventions
There is one object model for the Illustrator scripting interface, but actual object names vary slightly in the
different scripting languages:
AppleScript names are lower case, and individual words are separated by a space; for example:
graphic style
VBScript names are capitalized, and additional words in the name are indicated by uppercase initial
letters; for example:
GraphicStyle
JavaScript names begin with lowercase letters, and additional words in the name are indicated by
uppercase initial letters; for example:
graphicStyle
This chapter uses generic object and property names, but you can easily apply these conventions to
determine the corresponding language-specific names.
Throughout this document, names of properties, methods, and object are in a
monospaced
font.
Top-level (containing) objects
Use these objects to access global information about the Illustrator application or an individual document.
Application
The properties of the
application
object give your script access to global values, such as:
User
preferences
, which a user sets interactively in the Illustrator application by using the
Preferences dialog (Edit > Preferences).
System information like installed fonts (the
text
fonts
property) and printers (the
printer
list
property).
Also, there are properties that provide application-specific information and higher-level information
about any open documents:
Application information like the installation
path
,
version
, and whether Illustrator is
visible
.
The
current
active
document; that is, the art canvas that is displayed and accepting user input.
All open
documents
.
The
application
object’s methods or commands allow your script to perform application-wide actions;
for example:
Open
files
Undo
and
redo
transactions
Quit
Illustrator