Scripting Guide
Page 2
.... The software described in this document. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies that may be construed as a commitment by Adobe Systems Incorporated. Macintosh and Apple are registered trademarks, and Mac OS and AppleScript are trademarks of Microsoft Corporation. ii Adobe Illustrator CS Scripting Guide Copyright 2000, 2002-2003...
.... The software described in this document. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies that may be construed as a commitment by Adobe Systems Incorporated. Macintosh and Apple are registered trademarks, and Mac OS and AppleScript are trademarks of Microsoft Corporation. ii Adobe Illustrator CS Scripting Guide Copyright 2000, 2002-2003...
Scripting Guide
Page 4
... items 53 Working with text art 53 Content of a Text Range 55 Character Style, Character Attributes, Local Character Attributes 55 Printing Illustrator Documents 55 Transformation matrices 56 Using a matrix in an AppleScript script 57 Using a matrix in Visual Basic 47 Object containment: document...in AppleScript 46 Object references in a Visual Basic script 57 Working with variables and datasets 58 Datasets 58 Launching and quitting Illustrator from a script 58 Launching and quitting from AppleScript 58 Launching and quitting from Visual Basic 59 Some objects that cannot be...
... items 53 Working with text art 53 Content of a Text Range 55 Character Style, Character Attributes, Local Character Attributes 55 Printing Illustrator Documents 55 Transformation matrices 56 Using a matrix in an AppleScript script 57 Using a matrix in Visual Basic 47 Object containment: document...in AppleScript 46 Object references in a Visual Basic script 57 Working with variables and datasets 58 Datasets 58 Launching and quitting Illustrator from a script 58 Launching and quitting from AppleScript 58 Launching and quitting from Visual Basic 59 Some objects that cannot be...
Scripting Guide
Page 5
Adobe Illustrator CS Scripting Guide v User Interaction Levels 59 AppleScript 60 Visual Basic and JavaScript 60 The Scripts menu 60 Notes 61 Supported scripting languages 61 Script files ... stops 113 gradient stop info 115 graph item, graph items 116 graphic style, graphic styles 118 gray color info 119 group item, group items 120 Illustrator preferences 125
Adobe Illustrator CS Scripting Guide v User Interaction Levels 59 AppleScript 60 Visual Basic and JavaScript 60 The Scripts menu 60 Notes 61 Supported scripting languages 61 Script files ... stops 113 gradient stop info 115 graph item, graph items 116 graphic style, graphic styles 118 gray color info 119 group item, group items 120 Illustrator preferences 125
Scripting Guide
Page 6
vi Illustrator save options 125 ink 128 ink properties 128 insertion point 129 job options 132 JPEG export options 134 layer, layers 136 line 140 matrix 146 ...
vi Illustrator save options 125 ink 128 ink properties 128 insertion point 129 job options 132 JPEG export options 134 layer, layers 136 line 140 matrix 146 ...
Scripting Guide
Page 7
Adobe Illustrator CS Scripting Guide vii rounded rectangle 212 screen properties 213 screen spot function 214 separation screen 215 spot, spots 215 spot color info 217 star 218 ...
Adobe Illustrator CS Scripting Guide vii rounded rectangle 212 screen properties 213 screen spot function 214 separation screen 215 spot, spots 215 spot color info 217 star 218 ...
Scripting Guide
Page 9
Adobe Illustrator CS Scripting Guide ix Brush 295 Brushes 296 CharacterAttributes 297 Characters 300 CharacterStyle 301 CharacterStyles 301 CMYKColor 303 CompoundPathItem 304 CompoundPathItems 309 DataSet 310 DataSets 311 ...
Adobe Illustrator CS Scripting Guide ix Brush 295 Brushes 296 CharacterAttributes 297 Characters 300 CharacterStyle 301 CharacterStyles 301 CMYKColor 303 CompoundPathItem 304 CompoundPathItems 309 DataSet 310 DataSets 311 ...
Scripting Guide
Page 11
Adobe Illustrator CS Scripting Guide xi RasterItem 429 RasterItems 433 RGBColor 434 Screen 435 ScreenInfo 436 ScreenSpotFunction 436 Spot 437 Spots 439 SpotColor 440 Story 441 Stories 442 ... 466 Variable 466 Variables 467 View 468 Views 469 Words 470 Enumerations reference 471 Chapter 6: Changes Since Earlier Versions 487 Changes InThe Object Model for Illustrator CS 487 Macintosh / AppleScript 487 Windows / COM (Visual Basic, et al 487 Deprecated 489
Adobe Illustrator CS Scripting Guide xi RasterItem 429 RasterItems 433 RGBColor 434 Screen 435 ScreenInfo 436 ScreenSpotFunction 436 Spot 437 Spots 439 SpotColor 440 Story 441 Stories 442 ... 466 Variable 466 Variables 467 View 468 Views 469 Words 470 Enumerations reference 471 Chapter 6: Changes Since Earlier Versions 487 Changes InThe Object Model for Illustrator CS 487 Macintosh / AppleScript 487 Windows / COM (Visual Basic, et al 487 Deprecated 489
Scripting Guide
Page 13
..., and color models. 4. A brief introduction to the specifics of Illustrator Scripting 13 Concepts and approaches specific to the application are heartily encouraged to scripting Adobe® Illustrator® CS on scripting Illustrator. Details and examples are new to scripting, be familiar with programming ...- Scripting Basics - Bibliography - A bibliography of each platform's scripting language: AppleScript in Mac OS and Visual Basic in Illustrator's AppleScript dictionary. 5. Changes Since Earlier Versions - An introduction to get you will be sure to read this manual This ...
..., and color models. 4. A brief introduction to the specifics of Illustrator Scripting 13 Concepts and approaches specific to the application are heartily encouraged to scripting Adobe® Illustrator® CS on scripting Illustrator. Details and examples are new to scripting, be familiar with programming ...- Scripting Basics - Bibliography - A bibliography of each platform's scripting language: AppleScript in Mac OS and Visual Basic in Illustrator's AppleScript dictionary. 5. Changes Since Earlier Versions - An introduction to get you will be sure to read this manual This ...
Scripting Guide
Page 14
...tasks for printing at this text, you ? Graphic design is thirdparty plug-ins, which cannot be the assistant you could also write a script that accessed Illustrator's built-in computer science or mathematics to stretch, scale and distort a series of objects. A script is scripting? For example, you need a degree ... would be great if you had an assistant-one that the time you 're sleeping. 12 Aug 03 You can start with Illustrator's tools, menus, palettes, and dialog boxes can read this time). In fact, you'll probably notice that wouldn't mind doing creative work...
...tasks for printing at this text, you ? Graphic design is thirdparty plug-ins, which cannot be the assistant you could also write a script that accessed Illustrator's built-in computer science or mathematics to stretch, scale and distort a series of objects. A script is scripting? For example, you need a degree ... would be great if you had an assistant-one that the time you 're sleeping. 12 Aug 03 You can start with Illustrator's tools, menus, palettes, and dialog boxes can read this time). In fact, you'll probably notice that wouldn't mind doing creative work...
Scripting Guide
Page 15
...Windows. You record, play " an action, Illustrator performs all of the platform you need to do not use a program's user interface to information. Scripts are very similar. Visual Basic for a script. Adobe Illustrator CS Scripting Guide 15 Think about your work-is ...installed on your system before attempting to script Illustrator. 12 Aug 03 With the introduction of automating repetitive tasks, but actions...
...Windows. You record, play " an action, Illustrator performs all of the platform you need to do not use a program's user interface to information. Scripts are very similar. Visual Basic for a script. Adobe Illustrator CS Scripting Guide 15 Think about your work-is ...installed on your system before attempting to script Illustrator. 12 Aug 03 With the introduction of automating repetitive tasks, but actions...
Scripting Guide
Page 16
...Introduction Mac OS To write scripts on Mac OS, you must have Mac OS X 10.2. We use any Visual Basic editor to script Illustrator. Many applications that contain a built-in editor. Applications that support the Visual Basic for Applications (VBA) language contain a built-in ...package, all supported versions of the built-in Windows, you need for debugging and productivity features not found in this manual, we use Illustrator scripting in editors. As your scripts become more complex, you will also need for a complete development environment than one of Mac OS....
...Introduction Mac OS To write scripts on Mac OS, you must have Mac OS X 10.2. We use any Visual Basic editor to script Illustrator. Many applications that contain a built-in editor. Applications that support the Visual Basic for Applications (VBA) language contain a built-in ...package, all supported versions of the built-in Windows, you need for debugging and productivity features not found in this manual, we use Illustrator scripting in editors. As your scripts become more complex, you will also need for a complete development environment than one of Mac OS....
Scripting Guide
Page 17
... for both AppleScript on Mac OS and Visual Basic on using "commands" (AppleScript) or "methods" (Visual Basic). Automating Illustrator with Illustrator, see the appropriate reference chapter later in this manual. The bibliography contains references to more complete language guides for both scripting ...languages. 2 Scripting Basics If you use Illustrator, then you 've probably gotten used to thinking of an Illustrator document as technologically advanced, or magical, or both). If you do these words mean in ...
... for both AppleScript on Mac OS and Visual Basic on using "commands" (AppleScript) or "methods" (Visual Basic). Automating Illustrator with Illustrator, see the appropriate reference chapter later in this manual. The bibliography contains references to more complete language guides for both scripting ...languages. 2 Scripting Basics If you use Illustrator, then you 've probably gotten used to thinking of an Illustrator document as technologically advanced, or magical, or both). If you do these words mean in ...
Scripting Guide
Page 18
...like number of the room. Object classes Objects with the same properties and behaviors are the rooms, and the objects in a house. In Illustrator, path items, for doors. 18 Object model concepts Your house can also contain other objects, need names or at least a numbering system ...changed. Windows and doors, for example, is an object in your house can contain other objects, the objects within the house can tell Illustrator documents to open a window without telling it which it inherits properties. You have properties that the properties of the living room." So windows...
...like number of the room. Object classes Objects with the same properties and behaviors are the rooms, and the objects in a house. In Illustrator, path items, for doors. 18 Object model concepts Your house can also contain other objects, need names or at least a numbering system ...changed. Windows and doors, for example, is an object in your house can contain other objects, the objects within the house can tell Illustrator documents to open a window without telling it which it inherits properties. You have properties that the properties of the living room." So windows...
Scripting Guide
Page 19
...this fashion, you identify objects by their position in layers, which are a way to add descriptive text to the right object. In Illustrator, path items, for example, have the property stroke color which is the same-to give the script a way of comments is the ...collections (Visual Basic) are elements of a script that might , for good scripting. Adobe Illustrator CS Scripting Guide 19 number of creating object references, but the idea is inside Illustrator. When you send a command to an Illustrator object, you need to make sure you want to work with. The use different...
...this fashion, you identify objects by their position in layers, which are a way to add descriptive text to the right object. In Illustrator, path items, for example, have the property stroke color which is the same-to give the script a way of comments is the ...collections (Visual Basic) are elements of a script that might , for good scripting. Adobe Illustrator CS Scripting Guide 19 number of creating object references, but the idea is inside Illustrator. When you send a command to an Illustrator object, you need to make sure you want to work with. The use different...
Scripting Guide
Page 21
... true Whole numbers (no decimal points). Var.index = 1 12 Aug 03 The values of elements referenced by its label. A specific reference to do their work. Adobe Illustrator CS Scripting Guide 21 Values Types Values are shown in your scripts use to an object. Integers can be numbers or text. The value types are...
... true Whole numbers (no decimal points). Var.index = 1 12 Aug 03 The values of elements referenced by its label. A specific reference to do their work. Adobe Illustrator CS Scripting Guide 21 Values Types Values are shown in your scripts use to an object. Integers can be numbers or text. The value types are...
Scripting Guide
Page 22
To put data into a variable, we assign the data to the 12 Aug 03 The file name of the current Illustrator document or the current date are both examples of data that reflect the state of the current document and selection, for data. Visual Basic thisNumber = ... array), or an object reference. By using variables the scripts you will be assigned to objects. Why not simply enter the value directly in an Illustrator document. In AppleScript, it is not necessary to declare your variables before using a variable? In Visual Basic, however, it can assign data to the variables...
To put data into a variable, we assign the data to the 12 Aug 03 The file name of the current Illustrator document or the current date are both examples of data that reflect the state of the current document and selection, for data. Visual Basic thisNumber = ... array), or an object reference. By using variables the scripts you will be assigned to objects. Why not simply enter the value directly in an Illustrator document. In AppleScript, it is not necessary to declare your variables before using a variable? In Visual Basic, however, it can assign data to the variables...
Scripting Guide
Page 23
...layer at beginning of document 1 Visual Basic works similarly, however, there is also an object reference, use Set: Set thisLayer = Illustrator.Documents(1).Layers.Add or in reference to an existing layer, since it will take a little more readable names. For example, to ... Storing references in Visual Basic that they can also give your scripting system. You can 't contain punctuation or quotation marks. Adobe Illustrator CS Scripting Guide 23 newly created object. Variable names cannot begin with a reference to an existing object: set but with additional ...
...layer at beginning of document 1 Visual Basic works similarly, however, there is also an object reference, use Set: Set thisLayer = Illustrator.Documents(1).Layers.Add or in reference to an existing layer, since it will take a little more readable names. For example, to ... Storing references in Visual Basic that they can also give your scripting system. You can 't contain punctuation or quotation marks. Adobe Illustrator CS Scripting Guide 23 newly created object. Variable names cannot begin with a reference to an existing object: set but with additional ...
Scripting Guide
Page 25
... are open , the scripts display a messages in the document, or the date) and then act according to retrieve and change object properties. Adobe Illustrator CS Scripting Guide 25 Visual Basic In Visual Basic, use the Add method to create new objects, the Set statement to assign object references to Visual ...
... are open , the scripts display a messages in the document, or the date) and then act according to retrieve and change object properties. Adobe Illustrator CS Scripting Guide 25 Visual Basic In Visual Basic, use the Add method to create new objects, the Set statement to assign object references to Visual ...
Scripting Guide
Page 27
...{} and class of scripts. Typically, you send one or more values to (itemTop + itemBottom) / 2 return {xCenter, yCenter} end GetItemCenter 12 Aug 03 Adobe Illustrator CS Scripting Guide 27 Handlers and subroutines Handlers (in AppleScript) or subroutines (in Visual Basic) are scripting modules you can be used in subroutines and handlers... subroutines are simply conveniences that the selection is a selected item, and that save you have a single art item selected tell application "Adobe Illustrator CS" -- Get the selection from the list and get it returns one or more values.
...{} and class of scripts. Typically, you send one or more values to (itemTop + itemBottom) / 2 return {xCenter, yCenter} end GetItemCenter 12 Aug 03 Adobe Illustrator CS Scripting Guide 27 Handlers and subroutines Handlers (in AppleScript) or subroutines (in Visual Basic) are scripting modules you can be used in subroutines and handlers... subroutines are simply conveniences that the selection is a selected item, and that save you have a single art item selected tell application "Adobe Illustrator CS" -- Get the selection from the list and get it returns one or more values.
Scripting Guide
Page 28
... concepts Visual Basic Private Sub Command1_Click() ' Calculate the geometric center of a selected art item ' Assumes you have a single art item selected Dim appRef As New Illustrator.Application Dim selectedObjects As Variant Dim objectBounds As Variant Dim objectCenter As Variant If appRef.Documents.Count > 0 Then selectedObjects = appRef.Documents(1).Selection If TypeName(selectedObjects...
... concepts Visual Basic Private Sub Command1_Click() ' Calculate the geometric center of a selected art item ' Assumes you have a single art item selected Dim appRef As New Illustrator.Application Dim selectedObjects As Variant Dim objectBounds As Variant Dim objectCenter As Variant If appRef.Documents.Count > 0 Then selectedObjects = appRef.Documents(1).Selection If TypeName(selectedObjects...