Adobe Illustrator CS3
Scripting Guide Contents 4
Creating new objects............................................................................................................................................................25
Collection objects ..................................................................................................................................................................25
Selected objects .....................................................................................................................................................................26
Selecting text ....................................................................................................................................................................26
Selecting art items...........................................................................................................................................................26
Referring to selected art items....................................................................................................................................26
Notes on renaming objects stored in the application’s palettes..........................................................................26
Measurement units......................................................................................................................................................................27
Em space units ........................................................................................................................................................................27
Page item positioning and dimensions ...............................................................................................................................27
Art item bounds......................................................................................................................................................................28
Paths and shapes..........................................................................................................................................................................29
User interaction levels ................................................................................................................................................................29
Printing Illustrator documents ................................................................................................................................................30
4 Scripting with JavaScript .......................................................................................................... 31
Your first Illustrator script..........................................................................................................................................................31
Adding features to "Hello World".....................................................................................................................................32
Working with methods in JavaScript ....................................................................................................................................32
Accessing and referencing objects........................................................................................................................................33
Referencing the application object.................................................................................................................................33
Accessing objects in collections.......................................................................................................................................33
Creating new objects............................................................................................................................................................34
Working with selections ......................................................................................................................................................35
Selecting artwork objects .............................................................................................................................................35
Working with text frames..........................................................................................................................................................35
Threaded frames ....................................................................................................................................................................35
Threaded frames make a single story object.........................................................................................................36
Creating paths and shapes .......................................................................................................................................................36
Paths ...........................................................................................................................................................................................36
Specifying a series of x-y coordinates ......................................................................................................................36
Using pathPoint objects................................................................................................................................................37
Combining path point types .......................................................................................................................................38
Shapes........................................................................................................................................................................................39
Creating a rectangle .......................................................................................................................................................39
Creating a polygon..........................................................................................................................................................39
5 Scripting with AppleScript........................................................................................................ 40
Your first Illustrator script..........................................................................................................................................................40
Adding features to "Hello World".....................................................................................................................................41
Object references .........................................................................................................................................................................41
Obtaining objects from documents and layers ..........................................................................................................42
Creating new objects............................................................................................................................................................42
Working with selections ......................................................................................................................................................42
Selecting artwork objects .............................................................................................................................................43
Working with text frames..........................................................................................................................................................43
Threaded frames ....................................................................................................................................................................43
Threaded frames make a single story object.........................................................................................................44
Creating paths and shapes .......................................................................................................................................................44
Paths ...........................................................................................................................................................................................44
Specifying a series of x-y coordinates ......................................................................................................................44
Using path point objects...............................................................................................................................................44