Chapter 2: Scripting Basics; Object Model Concepts - Adobe 26001360 - Illustrator CS - PC Manual

Scripting guide
Hide thumbs Also See for 26001360 - Illustrator CS - PC:
Table of Contents

Advertisement

2
Scripting Basics
If you use Illustrator, then you work with documents and their contents. You create documents,
layers, colors, and design elements. If you do all of this, you've probably gotten used to thinking
of an Illustrator document as a series of objects.
Automating Illustrator with scripting uses the same object-oriented way of thinking. The heart
of a scriptable application is the object model. In Illustrator, the object model contains
documents, layers, colors, and page items—objects that can appear in an Illustrator document.
Each type of object has its own special properties, and every object in an Illustrator document
has its own identity.
In this chapter, we'll cover the basic concepts of scripting for both AppleScript on Mac OS and
Visual Basic on Windows. This brief introduction to the basic concepts and syntax of each
scripting language is by no means complete or exhaustive. The bibliography contains
references to more complete language guides for both scripting languages.
For detailed information on using your particular scripting system with Illustrator, see the
appropriate reference chapter later in this manual. Experienced scripters may want to skip to
those chapters now.

Object model concepts

The terminology of object oriented programming can be hard to understand, at first. "Objects"
belong to "classes" and have "properties" you manipulate using "commands" (AppleScript) or
"methods" (Visual Basic). What do these words mean in this context?
Here's a way to think about objects and their properties. Imagine that you live in a house that
responds to your commands (you can think of this house as technologically advanced, or
magical, or both). The house is an object, and its properties might include the number of
rooms, the color of the exterior paint, or the date of its construction.
17

Advertisement

Table of Contents
loading

This manual is also suitable for:

Illustrator cs

Table of Contents