C
3: Scripting Illustrator
HAPTER
➤
Use the
the following line creates a new reference to the
Set appRef = New Illustrator.Application
Quitting Illustrator
AppleScript
Use the
quit
tell application "Adobe Illustrator"
quit
end tell
JavaScript
Use the
app.quit()
app.quit()
VBScript
Use the
Application
Set appRef = CreateObject("Illustrator.Application")
appRef.Quit
Working with objects
Getting the frontmost document or layer
To refer to the selected document, use the
AppleScript or the
document
There are other types of "active" or "current" object properties, like
details, see the Adobe Illustrator CS4 Scripting Reference for your language.
Creating new objects
Several objects (besides the
objects. Your script must create these objects directly.
operator if you added a reference to the Illustrator type library to the project. For example,
New
command:
method:
object's
Quit
active document
object's
current layer
application
Application
method:
object's
application
property in JavaScript or VBScript. Similarly, you can use the
or
property to refer to the selected layer.
active layer
object itself ) cannot be obtained from containers or parent
Working with objects 26
object:
property in
current document
or
active dataset
active view
. For