EDOBE XDOM TPC Technical Information Page 26

  • Download
  • Add to my manuals
  • Print
  • Page
    / 68
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 25
26
3
Scripting Illustrator
This chapter is an overview of how to use scripting objects to program Illustrator CS5. Specific examples
for the supported scripting languages are in succeeding chapters.
Launching and quitting Illustrator from a script
Your scripts can control the activation and termination of Illustrator.
Launching and activating Illustrator
AppleScript
In AppleScript, you use a tell statement to target Illustrator. The activate command activates Illustrator
if it is not already active.
tell application "Adobe Illustrator"
activate
end tell
JavaScript
Typically, you run JavaScript scripts from the applications Scripts menu (File > Scripts) or start-up folder, so
there is no need to launch Illustrator from your script.
Information on launching Illustrator in JavaScript is beyond the scope of this guide. For details, search for
“interapplication messaging” or “JavaScript messaging framework” in JavaScript Tools Guide.
VBScript
In VBScript, there are several ways to create an instance of Illustrator:
X CreateObject launches Illustrator as an invisible application if it is not already running. If Illustrator is
launched as an invisible application you must manually activate the application to make it visible:
Set appRef = CreateObject("Illustrator.Application")
If you have multiple versions of Illustrator installed on the same machine and use the CreateObject
method to obtain an application reference, using
"Illustrator.Application" creates a reference
to the latest Illustrator version. To specifically target an earlier version, use a version identifier at the
end of the string:
For Illustrator 10, use
"Illustrator.Application.1"
For Illustrator CS, use
"Illustrator.Application.2"
For Illustrator CS2, use
"Illustrator.Application.3"
For Illustrator CS3, use
"Illustrator.Application.4"
For Illustrator CS4, use
"Illustrator.Application.CS4"
For Illustrator CS5, use
"Illustrator.Application.CS5"
Page view 25
1 2 ... 21 22 23 24 25 26 27 28 29 30 31 ... 67 68

Comments to this Manuals

No comments