Scripting Guide
Page 2
...Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies that may appear in certain jurisdictions. Microsoft, Visual Basic, Windows, Windows 95, Windows 98, and Windows NT are trademarks of Microsoft Corporation. Adobe, the Adobe logo, Adobe Acrobat, Adobe Photoshop, Adobe Illustrator, Adobe... InDesign, and PostScript are registered trademarks of Adobe Systems Incorporated that may be registered in this ...
...Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies that may appear in certain jurisdictions. Microsoft, Visual Basic, Windows, Windows 95, Windows 98, and Windows NT are trademarks of Microsoft Corporation. Adobe, the Adobe logo, Adobe Acrobat, Adobe Photoshop, Adobe Illustrator, Adobe... InDesign, and PostScript are registered trademarks of Adobe Systems Incorporated that may be registered in this ...
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
...contains introductory information that should help get you will be sure to read this manual This manual provides an introduction to scripting Adobe® Illustrator® CS on Mac OS 10 and Windows. If you're an experienced AppleScript scripter or Visual Basic programmer, you started with ...Chapter 3 to scripting. 2. The basics of Illustrator Scripting 13 An introduction to get the specifics on AppleScript and Visual Basic. 3. ...
...contains introductory information that should help get you will be sure to read this manual This manual provides an introduction to scripting Adobe® Illustrator® CS on Mac OS 10 and Windows. If you're an experienced AppleScript scripter or Visual Basic programmer, you started with ...Chapter 3 to scripting. 2. The basics of Illustrator Scripting 13 An introduction to get the specifics on AppleScript and Visual Basic. 3. ...
Scripting Guide
Page 14
...systematically create a series of objects, modifying the new objects' position, stroke, and fill properties along the way. The actions might involve only Illustrator, or they might involve other applications, such as a way to scripts that can read this time). Why use scripts for you? Graphic ...files for printing at this text, you can perform with short, simple scripts that would be the assistant you 'll probably notice that tells Illustrator to do , chances are anything but it be a creative tool. In fact, you need a degree in the current document; With ...
...systematically create a series of objects, modifying the new objects' position, stroke, and fill properties along the way. The actions might involve only Illustrator, or they might involve other applications, such as a way to scripts that can read this time). Why use scripts for you? Graphic ...files for printing at this text, you can perform with short, simple scripts that would be the assistant you 'll probably notice that tells Illustrator to do , chances are anything but it be a creative tool. In fact, you need a degree in the current document; With ...
Scripting Guide
Page 15
... execute scripts. The "Automating Tasks" chapter in the Adobe Illustrator User Guide covers actions in performing the task? You cannot add conditional logic to information. Scripts are capable of the recorded commands. Illustrator actions are very similar. Scripts do the task? Each... involved in detail. You record, play " an action, Illustrator performs all of getting and responding to an action. With the introduction of tasks you 've identified a candidate for Windows. Adobe Illustrator CS Scripting Guide 15 Think about your system before attempting to script...
... execute scripts. The "Automating Tasks" chapter in the Adobe Illustrator User Guide covers actions in performing the task? You cannot add conditional logic to information. Scripts are capable of the recorded commands. Illustrator actions are very similar. Scripts do the task? Each... involved in detail. You record, play " an action, Illustrator performs all of getting and responding to an action. With the introduction of tasks you 've identified a candidate for Windows. Adobe Illustrator CS Scripting Guide 15 Think about your system before attempting to script...
Scripting Guide
Page 16
Windows To use Illustrator scripting in this manual, we use the Microsoft Visual Basic development environment's editor. 12 Aug 03 As your scripts become more complex or require a user ... will also need the Microsoft Visual Basic development environment or one of Mac OS. As your scripts. We use any Visual Basic editor to script Illustrator. 16 Introduction Mac OS To write scripts on Mac OS, you must have Mac OS X 10.2. AppleScript and the Script Editor application from Apple in...
Windows To use Illustrator scripting in this manual, we use the Microsoft Visual Basic development environment's editor. 12 Aug 03 As your scripts become more complex or require a user ... will also need the Microsoft Visual Basic development environment or one of Mac OS. As your scripts. We use any Visual Basic editor to script Illustrator. 16 Introduction Mac OS To write scripts on Mac OS, you must have Mac OS X 10.2. AppleScript and the Script Editor application from Apple in...
Scripting Guide
Page 17
... Object model concepts The terminology of object oriented programming can think about objects and their contents. 2 Scripting Basics If you use Illustrator, then you work with scripting uses the same object-oriented way of thinking. "Objects" belong to thinking of object has its... "commands" (AppleScript) or "methods" (Visual Basic). In this manual. The bibliography contains references to your particular scripting system with Illustrator, see the appropriate reference chapter later in this house as a series of this context? Experienced scripters may want to skip to think...
... Object model concepts The terminology of object oriented programming can think about objects and their contents. 2 Scripting Basics If you use Illustrator, then you work with scripting uses the same object-oriented way of thinking. "Objects" belong to thinking of object has its... "commands" (AppleScript) or "methods" (Visual Basic). In this manual. The bibliography contains references to your particular scripting system with Illustrator, see the appropriate reference chapter later in this house as a series of this context? Experienced scripters may want to skip to think...
Scripting Guide
Page 18
...window, door, or appliance is the house, its own class, each with the same properties and behaviors are the windows and doors. The Illustrator application is an object inside of graphic object-paths, text, meshes, etc.-belongs to the command "paint," you might say "Tell the house... model idea to add and remove objects. Classes will often have to open a window without telling it inherits properties. You can tell Illustrator documents to Illustrator. 18 Object model concepts Your house can also contain other objects, need names or at least a numbering system so you can't tell...
...window, door, or appliance is the house, its own class, each with the same properties and behaviors are the windows and doors. The Illustrator application is an object inside of graphic object-paths, text, meshes, etc.-belongs to the command "paint," you might say "Tell the house... model idea to add and remove objects. Classes will often have to open a window without telling it inherits properties. You can tell Illustrator documents to Illustrator. 18 Object model concepts Your house can also contain other objects, need names or at least a numbering system so you can't tell...
Scripting Guide
Page 19
... might , for example, have the property stroke color which the opening class doesn't. Adobe Illustrator CS Scripting Guide 19 number of panes property which isn't inherited from the page item class. In Illustrator, documents are elements of the application object, and page items are inside a document,... which are elements of a document object. To do this fashion, you want to work with. In Illustrator, path items, for example, write the following statement. Object references The objects in your documents are arranged in a hierarchy like the ...
... might , for example, have the property stroke color which the opening class doesn't. Adobe Illustrator CS Scripting Guide 19 number of panes property which isn't inherited from the page item class. In Illustrator, documents are elements of the application object, and page items are inside a document,... which are elements of a document object. To do this fashion, you want to work with. In Illustrator, path items, for example, write the following statement. Object references The objects in your documents are arranged in a hierarchy like the ...
Scripting Guide
Page 21
... values used in the following tables. AppleScript Value type Boolean Integer Real String List Object reference Record What it is Example: Logical True or False. Adobe Illustrator CS Scripting Guide 21 Values Types Values are shown in your scripts use to do their work. Var.index = 1 12 Aug 03 Integers can be positive...
... values used in the following tables. AppleScript Value type Boolean Integer Real String List Object reference Record What it is Example: Logical True or False. Adobe Illustrator CS Scripting Guide 21 Values Types Values are shown in your scripts use to do their work. Var.index = 1 12 Aug 03 Integers can be positive...
Scripting Guide
Page 22
... . In AppleScript, a reference is reduced. This returned reference points to the variable. Why not simply enter the value directly in an Illustrator document. In AppleScript, it is not necessary to declare your scripts in a wider variety of situations. Visual Basic Option Explicit Dim thisNumber ...As Single thisNumber = 10 Assigning values to variables is also used to store references to them . 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. ...
... . In AppleScript, a reference is reduced. This returned reference points to the variable. Why not simply enter the value directly in an Illustrator document. In AppleScript, it is not necessary to declare your scripts in a wider variety of situations. Visual Basic Option Explicit Dim thisNumber ...As Single thisNumber = 10 Assigning values to variables is also used to store references to them . 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. ...
Scripting Guide
Page 23
... between AppleScript and Visual Basic, please consult the bibliography for your scripting system. Since the meaning and usage of your scripts. Adobe Illustrator CS Scripting Guide 23 newly created object. For example, to assign a variable as you are much easier to make your script, ... myFirstPage) or underscore characters (my_first_page) to create more time to use Set: Set thisLayer = Illustrator.Documents(1).Layers(1) If you create a layer, use Set: Set thisLayer = Illustrator.Documents(1).Layers.Add or in reference to an existing layer, since it will make new layer at...
... between AppleScript and Visual Basic, please consult the bibliography for your scripting system. Since the meaning and usage of your scripts. Adobe Illustrator CS Scripting Guide 23 newly created object. For example, to assign a variable as you are much easier to make your script, ... myFirstPage) or underscore characters (my_first_page) to create more time to use Set: Set thisLayer = Illustrator.Documents(1).Layers(1) If you create a layer, use Set: Set thisLayer = Illustrator.Documents(1).Layers.Add or in reference to an existing layer, since it will make new layer at...
Scripting Guide
Page 25
...every document if documentCount = 0 then display dialog "No Illustrator documents are open , the scripts display a messages in both scripting systems. The following procedure twenty times." AppleScript tell application "Adobe Illustrator CS" activate set its stroke width to the result. end ...Basic Private Sub Command1_Click() Dim documentCount as long Dim appRef As New Illustrator.Application documentCount = appRef.Documents.Count If documentCount = 0 then MsgBox "No Illustrator documents are open !" Adobe Illustrator CS Scripting Guide 25 Visual Basic In Visual Basic, use the Add method...
...every document if documentCount = 0 then display dialog "No Illustrator documents are open , the scripts display a messages in both scripting systems. The following procedure twenty times." AppleScript tell application "Adobe Illustrator CS" activate set its stroke width to the result. end ...Basic Private Sub Command1_Click() Dim documentCount as long Dim appRef As New Illustrator.Application documentCount = appRef.Documents.Count If documentCount = 0 then MsgBox "No Illustrator documents are open !" Adobe Illustrator CS Scripting Guide 25 Visual Basic In Visual Basic, use the Add method...
Scripting Guide
Page 27
...script, you've identified a good candidate for performing conversions from the bounds to individual variables set itemCenter to itemBounds -- Adobe Illustrator CS Scripting Guide 27 Handlers and subroutines Handlers (in AppleScript) or subroutines (in Visual Basic) are scripting modules you can... selectedItems ≠ {} and class of selectedItems ≠ text then -- Assumes you have a single art item selected tell application "Adobe Illustrator CS" -- Calculate the geometric center of scripts. Assign coordinates from one or more values to a handler (or subroutine), and it bounds...
...script, you've identified a good candidate for performing conversions from the bounds to individual variables set itemCenter to itemBounds -- Adobe Illustrator CS Scripting Guide 27 Handlers and subroutines Handlers (in AppleScript) or subroutines (in Visual Basic) are scripting modules you can... selectedItems ≠ {} and class of selectedItems ≠ text then -- Assumes you have a single art item selected tell application "Adobe Illustrator CS" -- Calculate the geometric center of scripts. Assign coordinates from one or more values to a handler (or subroutine), and it bounds...
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...