Scripting With Applescript; For More Information; Your First Illustrator Script - Adobe 65010248 - Illustrator CS4 - PC Manual

Scripting guide
Hide thumbs Also See for 65010248 - Illustrator CS4 - PC:
Table of Contents

Advertisement

4

Scripting with AppleScript

This chapter uses script examples and explanations to help you to become familiar with Illustrator
scripting using AppleScript.

For more information

Several extended sample scripts are in the
installation directory.
For information about individual classes, objects, properties, commands, and parameters, as well as script
samples that demonstrate how to use many of these items, see Adobe Illustrator CS4 Scripting Reference:
AppleScript, in the
also can view the Illustrator CS4 dictionary from the Script Editor application;see
object model" on page
If you do not understand the concepts and terms used in this chapter, read Adobe Introduction to Scripting.

Your first Illustrator script

The traditional first project in any programming language is displaying the message "Hello World!" In this
example, you create a new Illustrator document, then add a text frame containing this message. Follow
these steps:
1. Open Script Editor.
In a default Mac OS installation, Script Editor is in
cannot find the Script Editor application, you must reinstall it from your Mac OS system CD.
2. Enter the following script.
--Send the following commands to Illustrator
tell application "Adobe Illustrator"
--Create a new document
set docRef to make new document
--Create a new text frame with the string "Hello World"
set textRef to make new text frame in docRef
end tell
3. In the Script Editor toolbar, click Run.
T
: To add the script to the Illustrator Scripts menu (File > Scripts), save the script in the Scripts folder. The
IP
script will appear on the menu the next time you start Illustrator. For details, see
Scripts menu" on page
:Scripting:Documentation
8.
with properties {contents: "Hello World!", position:{200, 200}}
10.
:Scripting:Sample Scripts
folder in your Illustrator CS4 installation directory. You
Applications:AppleScript:Script Editor
folder in your Illustrator CS4
"Viewing the AppleScript
"Installing scripts in the
. If you
33

Advertisement

Table of Contents
loading

This manual is also suitable for:

Illustrator cs4

Table of Contents