Adobe 26001360 Scripting Guide

Adobe 26001360 - Illustrator CS - PC Manual

Adobe 26001360 manual content summary:

  • Adobe 26001360 | Scripting Guide - Page 1
    Adobe Illustrator CS a Scripting Guide August 12, 2003 Adobe Developer Support 345 Park Avenue San Jose, CA 95110-2704 408-536-9000 FaxYI: 206-628-5737 [email protected] http://partners.adobe.com Europe: PO Box 12356 Edinburgh EH11 4GJ United Kingdom +44.131.458.6800 Fax: +44.131.458 6801 euroADA@
  • Adobe 26001360 | Scripting Guide - Page 2
    and may only be used or copied in accordance with the terms of such license. Adobe, the Adobe logo, Adobe Acrobat, Adobe Photoshop, Adobe Illustrator, Adobe InDesign, and PostScript are trademarks of Adobe Systems Incorporated that may be registered in certain jurisdictions. Macintosh and Apple are
  • Adobe 26001360 | Scripting Guide - Page 3
    Contents Chapter 1: Introduction 13 About this manual 13 What is scripting 14 Why use scripting 14 What about actions 15 System requirements methods 24 Conditional statements 25 Control structures 25 Handlers and subroutines 27 Testing and troubleshooting 29 About error handling 31 iii
  • Adobe 26001360 | Scripting Guide - Page 4
    an AppleScript script 57 Using a matrix 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 created
  • Adobe 26001360 | 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 datasets 88 document, documents 91 ellipse 98 EPS save options 100 Flash export options 102 flattening options 104 font, fonts 105 font
  • Adobe 26001360 | Scripting Guide - Page 6
    vi Illustrator save options 125 ink 128 ink properties 128 insertion point 129 176 path point info 178 pattern, patterns 179 pattern color info 180 PDF options 181 PDF save options 183 Photoshop options 188 Photoshop export options 190 placed item, placed items 192 plugin item, plugin
  • Adobe 26001360 | 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 story, stories
  • Adobe 26001360 | Scripting Guide - Page 8
    identity matrix 263 get rotation matrix 264 get scale matrix 264 get translation matrix 265 import character styles 265 import paragraph styles 266 import PDF preset 267 import print preset 267 import variables 268 invert matrix 268 make 269 move 270 open 271 paste 272 print 273 quit
  • Adobe 26001360 | 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 Document 312
  • Adobe 26001360 | Scripting Guide - Page 10
    x Lines 364 Matrix 366 MeshItem 367 MeshItems 370 NoColor 372 OpenOptions 373 PageItems 374 Paper 376 PaperInfo 377 ParagraphAttributes 377 Paragraphs 380 ParagraphStyle 381 ParagraphStyles 383 PathItem 383 PathItems 389 PathPoint 391 PathPoints 392 Pattern 393 Patterns 394
  • Adobe 26001360 | Scripting Guide - Page 11
    Adobe Illustrator CS Scripting Guide xi RasterItem 429 RasterItems 433 RGBColor 434 Screen 435 ScreenInfo 436 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
  • Adobe 26001360 | Scripting Guide - Page 12
    xii Chapter : Bibliography 491 AppleScript 491 Visual Basic 491 Internet resources 492 Adobe Systems, Inc 492 AppleScript 492 Visual Basic 492
  • Adobe 26001360 | Scripting Guide - Page 13
    1 Introduction About this manual This manual provides an introduction to scripting Adobe® Illustrator® CS on Mac OS 10 and Windows. Since not every Illustrator user will be familiar with programming terms, concepts, and techniques, so we've included Chapter 2, "Scripting Basics," which contains
  • Adobe 26001360 | Scripting Guide - Page 14
    would be too difficult or time consuming to do manually. For example, you could write a script to creativity, but aspects of the actual work of illustration and page layout are anything but creative. When preparing files for printing at an imagesetting service provider often reduce the time you have
  • Adobe 26001360 | Scripting Guide - Page 15
    Illustrator's built-in Actions palette. The "Automating Tasks" chapter in the Adobe Illustrator User Guide covers actions in detail. With the introduction of scripting for Illustrator ways that they work with Illustrator are very similar. Each example script shown in this manual will be shown in both
  • Adobe 26001360 | Scripting Guide - Page 16
    10.2. You will also need AppleScript and a script editor installed. AppleScript and the Script Editor application from Apple come installed on all supported /. We use the Script Editor from Apple in this manual. Windows To use Illustrator scripting in Windows, you must have Windows 98, Windows
  • Adobe 26001360 | Scripting Guide - Page 17
    . The bibliography contains references to more complete language guides for both scripting languages. For detailed information on using your particular scripting system with Illustrator, see the appropriate reference chapter later in this manual. Experienced scripters may want to skip to those
  • Adobe 26001360 | Scripting Guide - Page 18
    Because your door can respond to the command "paint," you'll soon have a door of a different color. Now let's apply this object model idea to Illustrator. The Illustrator application is the house, its documents are the rooms, and the objects in your documents are the windows and doors. You can tell
  • Adobe 26001360 | Scripting Guide - Page 19
    Adobe Illustrator CS Scripting Guide 19 number of panes property which the opening class doesn't. In Illustrator, path items, for example, have the property stroke color which isn't inherited from the page item class. Object elements or collections Object elements (AppleScript) or
  • Adobe 26001360 | Scripting Guide - Page 20
    . ' This is a comment About long script lines In some cases, individual script lines are too long to print on a single line in this guide. AppleScript AppleScript uses the special character (¬) to show that the line continues to the next line. This continuation character denotes a "soft return" in
  • Adobe 26001360 | Scripting Guide - Page 21
    Adobe Illustrator CS Scripting Guide 21 Values Types Values are the data your scripts use . "I am a string" An ordered list of values. The values of a list may be any type. {10.0, 20.0, 30.0, 40.0} A specific reference to an object. document 1 An unordered list of properties, Each property
  • Adobe 26001360 | Scripting Guide - Page 22
    . AppleScript set thisNumber to 10 set thisString to "Hello, World!" Visual Basic thisNumber = 10 thisString = "Hello, World!" Variables can also be used to store references to objects. In AppleScript, a reference is returned when you create a new object in an Illustrator document. This returned
  • Adobe 26001360 | Scripting Guide - Page 23
    Adobe Illustrator CS Scripting Guide 23 newly created object. Storing references in variables For example, to assign a variable as you create a layer, use Set: Set thisLayer = Illustrator.Documents(1).Layers.Add or in reference to an existing layer, since it is also an object reference,
  • Adobe 26001360 | Scripting Guide - Page 24
    /2 would return a value equal to half of the content of the variable docWidth. So if docWidth contained the number 20.5, the value returned would be 10.25. You can also use operators to perform comparisons (equal to, not equal to, greater than, or less than). For example: docWidth > docHeight Would
  • Adobe 26001360 | Scripting Guide - Page 25
    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 Basic variables
  • Adobe 26001360 | Scripting Guide - Page 26
    26 Scripting concepts for repetitive processes, or "loops." The idea of a loop is to repeat some action over and over again, with or without changes each time through the loop, until some condition is met. Both AppleScript and Visual Basic have a variety of different control structures to choose
  • Adobe 26001360 | Scripting Guide - Page 27
    Adobe Illustrator CS Scripting Guide 27 Handlers and subroutines Handlers (in AppleScript) or a selected art item -- Assumes you have a single art item selected tell application "Adobe Illustrator CS" -- Get the selection from the current document set selectedItems to selection (* Make
  • Adobe 26001360 | Scripting Guide - Page 28
    () ' 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
  • Adobe 26001360 | Scripting Guide - Page 29
    Adobe Illustrator CS Scripting Guide 29 Testing and troubleshooting Both scripting environments provide tools for monitoring the progress of your script while it is running-which make it easier for you to track down any problems your script might be encountering or causing. AppleScript While the
  • Adobe 26001360 | Scripting Guide - Page 30
    30 Testing and troubleshooting In addition, the Result window (choose Controls > Show Result) will display the value from the last script statement evaluated. Third-party editors offer additional debugging
  • Adobe 26001360 | Scripting Guide - Page 31
    Adobe Illustrator CS Scripting Guide 31 values of variables defined in your script using the Watch window-a very valuable tool for debugging your scripts. To view a variable in the Watch
  • Adobe 26001360 | Scripting Guide - Page 32
    the fifth path item of the document in a variable --If the object does not exist in the current document, display a message tell application "Adobe Illustrator CS" activate try set itemCount to count of path items in current document set fifthItem to path item 5 of current document on error display
  • Adobe 26001360 | Scripting Guide - Page 33
    how it works. We are ready to begin looking at scripting Adobe Illustrator. Illustrator's object model A good understanding of Illustrator's object model will improve your scripting abilities. Figure 3.1, "Adobe Illustrator Scripting Object Model" shows the containment hierarchy of the object model
  • Adobe 26001360 | Scripting Guide - Page 34
    34 Figure 3.1 Adobe Illustrator Scripting Object Model Text Font Brush Paragraph Style Character Path Item Path Point Scripting Illustrator Looking at Illustrator's objects and commands While the objects and commands available in Illustrator are all documented in this guide, you can also view
  • Adobe 26001360 | Scripting Guide - Page 35
    Adobe Illustrator CS Scripting Guide 35 3. Find and then select the Illustrator application and click the OK button. Script Editor displays a list of Illustrator's objects and commands. You'll also be able to see the properties and elements associated with each object, as well as the parameters
  • Adobe 26001360 | Scripting Guide - Page 36
    Visual Basic displays the References dialog box. If you are using a built-in editor in a VBA application, choose Tools > References. 2. Turn on the "Adobe Illustrator CS Type Library" option from the list of available references and click the OK button. If the library does not appear in the list of
  • Adobe 26001360 | Scripting Guide - Page 37
    Adobe Illustrator CS Scripting Guide 37 Your first Illustrator script The traditional first project in any programming language is to display the message "Hello World!" In this example, we'll create a new Illustrator document, then add a text frame item containing this message. Creating an
  • Adobe 26001360 | Scripting Guide - Page 38
    .Add 'Set the contents and position of the TextFrame sampleText.Position = Array(200, 200) sampleText.Contents = "Hello World!" End Sub 5. Save the form. 6. Start Illustrator. 7. Return to Visual Basic and run the program. If you created a form, click the button you created earlier. 12 Aug 03
  • Adobe 26001360 | Scripting Guide - Page 39
    the scripts shown in this guide are: • VBScript is not as strongly typed as Visual basic. In Visual Basic you say: Dim aRef as Illustrator.PathItem in VBScript you say: Dim aRef For VBScript simply omit the "as X" part. • VBScript does not support the "as New Illustrator.Application" form. In Visual
  • Adobe 26001360 | Scripting Guide - Page 40
    page 287 to find the values that correspond to the various enumerations.) The corresponding VBScript is: Dim appRef Set appRef = CreateObject("Illustrator.Application") appRef.ActiveDocument.Close ( 2 ) Here is an example of Hello World! for VBScript: 'Hello World! script Dim appRef Dim documentRef
  • Adobe 26001360 | Scripting Guide - Page 41
    Guide 41 3. Resize the text frame item to match the document's width. Adding features to the AppleScript script To create the enhanced script follow these steps: 1. Choose File > New in Script Editor to create a new script. 2. Enter the following code: tell application "Adobe Illustrator
  • Adobe 26001360 | Scripting Guide - Page 42
    2 inches to the right of, and 6 inches above, its current position, you'd use the following script in AppleScript: tell application "Adobe Illustrator CS" (* first, manually select the text frame item from the previous exercise or use AppleScript to make the selection *) set selection to text frame
  • Adobe 26001360 | Scripting Guide - Page 43
    Adobe Illustrator CS Scripting Guide 43 If TypeName(selectedObjects) = "Variant()" Then For , 1 em equals 6 points; in a 10-point font, 1 em equals 10 points. Similarly, a kerning value of 20 em units for a 10-point font would be equivalent to: (20 units x 10 points) / 1000 units/em = 0.2 points
  • Adobe 26001360 | Scripting Guide - Page 44
    Visual Basic uses index position 0 for the first item in an array. Dim aPoint(1) As Single aPoint(0) = 5.0 aPoint(1) = 10.2 Zero point The zero point (0, 0) for coordinate numbering in Illustrator is in the lower left corner of the document. On the horizontal axis, coordinates to the right of the
  • Adobe 26001360 | Scripting Guide - Page 45
    Adobe Illustrator CS Scripting Guide 45 Fixed rectangle To work with rectangular coordinates where there are a pair of x and y values, Illustrator uses the special class called a fixed rectangle. This class consists of a list with four items in AppleScript, and a variant array with four elements
  • Adobe 26001360 | Scripting Guide - Page 46
    - control points. Object references The different scripting languages take different approaches to object references. Object references in AppleScript In AppleScript, Illustrator returns object references by index position or name. For example, a reference to the first path in layer 2 would be: path
  • Adobe 26001360 | Scripting Guide - Page 47
    Adobe Illustrator CS Scripting Guide 47 Therefore, any references made to path item 1 of layer 2 of document 1 will refer to the new object. Consider the following sample script. -- Make 2 new objects and try to select both tell application "Adobe Illustrator CS" set newDocument to make new
  • Adobe 26001360 | Scripting Guide - Page 48
    .Selection = pathSelection End Sub Object containment: document vs. layer In Illustrator, all artwork objects are contained in layers, groups or compound paths for first page item of document 1 tell application "Adobe Illustrator CS" set pageItemRef to page item 1 of document 1 end tell 12 Aug
  • Adobe 26001360 | Scripting Guide - Page 49
    Adobe Illustrator CS Scripting Guide 49 In Visual Basic: Private Sub Command1_Click() 'Get reference for first page item of document 1 Dim appRef As New Illustrator.Application Dim documentRef As Illustrator.Document Dim pageItemRef As Illustrator.PageItem Set documentRef = appRef.ActiveDocument
  • Adobe 26001360 | Scripting Guide - Page 50
    50 In AppleScript: --selection sorter tell application "Adobe Illustrator CS" set selectedObjects to selection try if selectedObjects is {} then display dialog "No objects are selected" else if if end if on error errString display dialog errString end try end tell 12 Aug 03 Scripting Illustrator
  • Adobe 26001360 | Scripting Guide - Page 51
    Adobe Illustrator CS Scripting Guide 51 In Visual Basic: 'Selection sorter Private Sub Command1_Click() Dim appRef As New Illustrator.Application Dim documentRef As Illustrator.Document Set documentRef = appRef.ActiveDocument selectedObjects = documentRef.Selection If TypeName(selectedObjects) =
  • Adobe 26001360 | Scripting Guide - Page 52
    Illustrator Software Development Kit (SDK), which can be downloaded from the Adobe Solutions Network (ASN) web site: http://partners.adobe attention should be paid to working with CMYK and RGB color values. Illustrator CS supports only a single color model within each document, either CMYK or RGB.
  • Adobe 26001360 | Scripting Guide - Page 53
    during this conversion. Refer to the "Applying Color" chapter in the Adobe Illustrator User Guide for more information on working with color. Working with symbols Symbols are art objects that are stored in the Symbols palette and applied to documents.
  • Adobe 26001360 | Scripting Guide - Page 54
    line because they do not fit in the width of the text art. Unlike characters, paragraphs and words, lines can only be created by the Illustrator application. Refer to the "Using Type" chapter in the Adobe Illustrator User Guide for more information on working with text art. 12 Aug 03
  • Adobe 26001360 | Scripting Guide - Page 55
    which allows them to focus on other more creative work. Scripting exposes the full capabilities of Illustrator printing, some of which may not be accessible through the normal print user interface. Illustrator supports at most one print session at any give time because of limitations in the current
  • Adobe 26001360 | Scripting Guide - Page 56
    an options parameter to more fully control the printing process. Illustrator CS supports an extensive list of new printing options, all of which have matrices Thanks to the matrix class and the many commands that support matrices, you have access to the power of geometric transformation matrices
  • Adobe 26001360 | Scripting Guide - Page 57
    items. *) tell application "Adobe Illustrator CS" set transformationmatrix to get 10 degrees counter clockwise Set totalMatrix = appRef.ConcatenateRotationMatrix(moveMatrix, 10) 'Apply the transformation to all art in the document Dim frontDocument As Illustrator.Document Dim artItem As Illustrator
  • Adobe 26001360 | Scripting Guide - Page 58
    below for your scripting system. Launching and quitting from AppleScript Use the activate and quit commands to control Illustrator's run state. The activate command will bring the Illustrator application to the front if it is not already the frontmost application. Note that if the clipboard
  • Adobe 26001360 | Scripting Guide - Page 59
    of the script to a halt until the dialog is dismissed. This can be a serious problem in an automation environment where there is typically no one present to deal with dialogs. The Illustrator CS application class contains a user interaction level property. By setting this property a script can
  • Adobe 26001360 | Scripting Guide - Page 60
    be difficult for a remote user to dismiss a dialog, but it would be no problem for someone sitting in front of the machine. In this case, an interaction level of is allowed Interaction is allowed The Illustrator CS Windows scripting interface doesn't support remote script execution so it doesn
  • Adobe 26001360 | Scripting Guide - Page 61
    Adobe Illustrator CS Scripting Guide Supported scripting languages The Scripts menu supports AppleScript and JavaScript scripts for Mac OS, and VBScript, JavaScript, and Visual Basic scripts for Windows. Script files For a file to be recognized by Illustrator Mac OS (9.x and 10.x) it is possible for
  • Adobe 26001360 | Scripting Guide - Page 62
    of nested sub-folders inside the Scripts folder for the Mac OS version of Illustrator. Executing other scripts A Browse item is provided at the end of the Scripts script file for execution. Only files which are of one of the supported file types, as listed in the Script Files section above will be
  • Adobe 26001360 | Scripting Guide - Page 63
    . • Valid commands. • Notes to explain special issues. • Script examples. Throughout this guide, when an object inherits properties from another object, we repeat all of the property definitions to maximize usability. Note: See "Illustrator's object model" on page 33 for an overview of how
  • Adobe 26001360 | Scripting Guide - Page 64
    name R/O list of Unicode text R/O integer R/O boolean R/O Unicode text PDF presets PPDs R/O list of Unicode text R/O list of PPD files (not related to the filename of the application file); always returns "Adobe Illustrator CS" The list of print preset names currently available for use The list
  • Adobe 26001360 | Scripting Guide - Page 65
    Adobe Illustrator CS Scripting Guide 65 Table 4.2 application - Properties (Continued) Property R/O Value type What it is printers properties scripting version selection settings user interaction level version R/O list of Unicode text
  • Adobe 26001360 | Scripting Guide - Page 66
    66 AppleScript Reference Illustrator does not support the select command to change the application's current selection. Use set the selection to in place of select. -- Select the first object in the document tell application "Adobe Illustrator CS" -- Make sure there is a page item to select if (
  • Adobe 26001360 | Scripting Guide - Page 67
    Adobe Illustrator CS Scripting Guide 67 brush, brushes A brush or list of brushes. Brushes are contained apply • count • exists Notes Additional brushes may be created by the user within Illustrator. Illustrator's brushes can be accessed from scripting, but cannot be created. Example 2.1 This
  • Adobe 26001360 | Scripting Guide - Page 68
    is text or (count items of selectedItems) is not 1 then display dialog "Select a single path item before running this script" else tell application "Illustrator CS" set pathItem to item 1 of selectedItems -- Get the item's position and use it to tile the new items below set {itemX, itemY
  • Adobe 26001360 | Scripting Guide - Page 69
    Adobe Illustrator CS Scripting Guide 69 character Specifies the properties of a character. Table 4.4 Character - Elements Elements Refer to by character style character insertion point line paragraph style paragraph text word
  • Adobe 26001360 | Scripting Guide - Page 70
    70 AppleScript Reference Table 4.5 Character - Properties (Continued) Property R/O Value Type What it is alignment alternate glyphs alternate ligature auto leading baseline direction baseline position baseline shift best type Valid values: • bottom • center • icf bottom • icf top • roman
  • Adobe 26001360 | Scripting Guide - Page 71
    Adobe Illustrator CS Scripting Guide 71 Table 4.5 Character - Properties (Continued) Property R/O Value Type What it is capitalization character offset of this instance of the object If true, the Japanese OpenType supports italics If true, the character is a Japanese Kana character 12 Aug 03
  • Adobe 26001360 | Scripting Guide - Page 72
    72 AppleScript Reference Table 4.5 Character - Properties (Continued) Property R/O Value Type What it is kerning kerning method language leading length ligature no break OpenType position ordinals ornaments real Controls the spacing between two characters, in thousandths of an em space
  • Adobe 26001360 | Scripting Guide - Page 73
    Adobe Illustrator CS Scripting Guide 73 Table 4.5 Character - Properties (Continued) Property R/O Value Type What it is overprint fill overprint stroke properties proportional metrics rotation selection size story stroke color stroke
  • Adobe 26001360 | Scripting Guide - Page 74
    for one) lines The Wari-Chu scale Valid Commands • count • delete • duplicate • exists • make • move Notes The text contained within text frames in Illustrator can be accessed using the character, insertion point, word, line, paragraph and text classes. The properties and valid commands for all of
  • Adobe 26001360 | Scripting Guide - Page 75
    Adobe Illustrator CS Scripting Guide 75 Example 3.1 In the example below, the selection property has all of the properties that character or any other text class would have. -- Make the currently selected text superscript tell application "Illustrator CS" -- Make sure one or more characters of
  • Adobe 26001360 | Scripting Guide - Page 76
    76 AppleScript Reference set characterCount to count characters in textFrame set factor to (characterCount + 1) / 2 -- Iterate over each character, changing its horizontal scale repeat with i from 1 to characterCount set hScaling to (factor - i) / factor if hScaling < 0 then set hScaling to -
  • Adobe 26001360 | Scripting Guide - Page 77
    Adobe Illustrator CS Scripting Guide 77 Table 4.6 character style - Properties Property R/O Value Type What it is alternate glyphs alternate ligature Valid values: • default • expert • full width • half width • jis78 • jis83 •
  • Adobe 26001360 | Scripting Guide - Page 78
    should be used Character horizontal scaling factor expressed as a percentage (100 = 100%) The index of this instance of the object If true, the Japanese OpenType supports italics The automatic kerning method to use 12 Aug 03
  • Adobe 26001360 | Scripting Guide - Page 79
    Adobe Illustrator CS Scripting Guide 79 Table 4.6 character style - Properties Property R/O Value Type What it is language The language of the text All of this object's properties returned in a single record If true, the Japanese OpenType font supports proportional glyphs 12 Aug 03
  • Adobe 26001360 | Scripting Guide - Page 80
    80 Table 4.6 character style - Properties Property R/O Value Type rotation real size stroke color stroke weight stylistic alternates real color info real boolean swash boolean TCY horizontal integer TCY vertical integer titling boolean tracking real Tsume real vertical scale
  • Adobe 26001360 | Scripting Guide - Page 81
    Adobe Illustrator CS Scripting Guide 81 Table 4.6 character style - Properties Property R/O Value Type What it is For each character in the text frame, apply the character style -- tell application "Illustrator CS" activate make new document make new text frame in document 1 with properties {
  • Adobe 26001360 | Scripting Guide - Page 82
    82 AppleScript Reference set the tracking of character style "Big Red" of document 1 to -50 set the capitalization of character style "Big Red" of document 1 to all caps set the fill color of character style "Big Red" of document 1 to {class:RGB color info, red:255, green:0, blue:0} -- 'apply
  • Adobe 26001360 | Scripting Guide - Page 83
    Adobe Illustrator CS Scripting Guide 83 Notes This class is used to define a record which contains the color component values of a CMYK color. It is used for specifying and retrieving color information from an Illustrator document or from page items in a document. If the color space of a
  • Adobe 26001360 | Scripting Guide - Page 84
    84 • RGB color info • spot color info AppleScript Reference color management options Specifies the color management options. Table 4.8 color management options - Properties Property R/O Value Type What it is intent name profile kind Valid values: • absolute colorimetric • perceptual •
  • Adobe 26001360 | Scripting Guide - Page 85
    Adobe Illustrator CS Scripting Guide 85 Table 4.9 color separation options - Properties (Continued) Property R/O two or more paths that are painted so that holes appear where paths overlap. Table 4.10 compound path item, compound path items - Elements Element: Refer to by: path item name
  • Adobe 26001360 | Scripting Guide - Page 86
    A handler which return paths in a document that are not part of a -- compound path or group to GetPathItemsOfDocument(docRef) tell application "Illustrator CS" set pathItemList to {} set layerCount to count layers of docRef repeat with i from 1 to layerCount set pathItemList to pathItemList & every
  • Adobe 26001360 | Scripting Guide - Page 87
    Adobe Illustrator CS Scripting Guide 87 Example 6.2 Compound paths contain path items that can a set of paths duplicated from the -- first compound path item of the document tell application "Illustrator CS" set pathItemList to every path item of ¬ compound path item 1 of current document set
  • Adobe 26001360 | Scripting Guide - Page 88
    88 AppleScript Reference Table 4.12 coordinate options - Properties (Continued) Property R/O Value Type What it is position tiling vertical scale Valid values: • bottom • bottom left • bottom right • center • left • right • top • top left • top right Valid values: • full pages • imageable
  • Adobe 26001360 | Scripting Guide - Page 89
    Adobe Illustrator CS Scripting Guide 89 Table 4.13 dataset, datasets - Properties (Continued) Property R/O the rectangle -- Make the second dataset -- display the two datasets -- tell application "Illustrator CS" activate make new document make new variable in document 1 with properties {name
  • Adobe 26001360 | Scripting Guide - Page 90
    90 AppleScript Reference set hidden of page item "Rec1" of document 1 to true set the contents of text frame "Text1" of document 1 to "Now you don't!" make new dataset in document 1 with properties {name:"My Second Dataset"} repeat 3 times delay 1 display dataset "My First Dataset" of document 1
  • Adobe 26001360 | Scripting Guide - Page 91
    Adobe Illustrator CS Scripting Guide 91 document, documents An Illustrator document or a list of documents. Documents are contained in the application object. Table 4.14 document, documents - Elements Element: Refer to by: brush character style compound
  • Adobe 26001360 | Scripting Guide - Page 92
    92 AppleScript Reference Table 4.15 document, documents - Properties Property R/O Value type What it is best type R/O class R/O color space R/O crop marks crop style current dataset current layer current view R/O default fill color default fill overprint default filled default
  • Adobe 26001360 | Scripting Guide - Page 93
    93 AppleScript Reference Table 4.15 document, documents - Properties (Continued) Property R/O Value type What it is default stroke join default stroke miter limit Valid values: • mitered • rounded • beveled real default stroke overprint default stroke width default stroked default type
  • Adobe 26001360 | Scripting Guide - Page 94
    94 AppleScript Reference Table 4.15 document, documents - Properties (Continued) Property R/O Value type What it is Mojikumi set name output resolution page origin print tiles properties ruler origin ruler units selection show placed images split long paths stationery tile full pages R/O list
  • Adobe 26001360 | Scripting Guide - Page 95
    when printing this document If true, the variables are locked The object's visible bounds, including stroke width of any objects in the illustration The width of this document, calculated from the geometric bounds Valid Commands • close • count • exists • export • make • open • print • save Notes
  • Adobe 26001360 | Scripting Guide - Page 96
    setting any of the application's default properties. -- Check to make sure a document is open in Illustrator -- before setting the application's default stroke width to 8 points tell application "Illustrator CS" if not (document 1 exists) then make new document with properties {color space: CMYK
  • Adobe 26001360 | Scripting Guide - Page 97
    Adobe Illustrator CS Scripting Guide 97 set strokeDashes to {2.5, 1, 2.5, 1, 2.5, 1} else set strokeDashes to {} end if tell application "Illustrator CS" -- Create a document with the requested color space if documentType starts with "CMYK" then set docRef to make new document with properties {
  • Adobe 26001360 | Scripting Guide - Page 98
    ellipse path should be inscribed (drawn inside the rectangle described by the bounds) If true, the ellipse path reversed Valid Commands • make Notes Illustrator's ellipse object is available exclusively for use with the make command. The class of the object created will be a path item. Therefore
  • Adobe 26001360 | Scripting Guide - Page 99
    Adobe Illustrator CS Scripting Guide 99 or class of selectedItems is text ¬ or class of item 1 of selectedItems is not path item then display dialog "Please select a single path item
  • Adobe 26001360 | Scripting Guide - Page 100
    embed linked files flatten output included document thumbnails overprint PostScript boolean boolean Valid values: • Illustrator 3 • Illustrator 8 • Illustrator 9 • Illustrator 10 • Illustrator CS • Japanese 3 boolean boolean Valid values: • preserve paths • preserve appearance boolean Valid values
  • Adobe 26001360 | Scripting Guide - Page 101
    Adobe Illustrator CS Scripting Guide 101 Table 4.17 EPS save options - Properties (Continued) Property R/O Value type preview specified. Example 10.1 This handler processes a folder of Illustrator files, saving each as an EPS file with level 2 PostScript and Illustrator CS compatibility. The
  • Adobe 26001360 | Scripting Guide - Page 102
    ¬ with options {class:EPS save options ¬ , compatibility:Illustrator 9 ¬ , preview:color Macintosh ¬ , embed linked files 10, default: 7) Valid values: • Flash file • layers to files • layers to frames How the Flash file should be created (default: Flash file) real When exporting layers to Flash
  • Adobe 26001360 | Scripting Guide - Page 103
    Adobe Illustrator CS Scripting Guide 103 Table 4.18 Flash export options - Properties (Continued) Property R/O Value type What it is JPEG quality looping read only replacing resolution integer boolean boolean Valid values: • yes • no • ask real Level of compression (0-10, default: 3) If true
  • Adobe 26001360 | Scripting Guide - Page 104
    options -- Create a variable that holds the print options -- Print the document -- A document and a printer must be present -- tell application "Illustrator CS" activate set flatOpts to {class:flattening options, clip complex regions:true, gradient resolution:360, rasterization resolution:360} set
  • Adobe 26001360 | Scripting Guide - Page 105
    Adobe Illustrator CS Scripting Guide font, fonts An installed font. Table 4.20 font - Properties Property R/O Value printing. Table 4.21 font options - Properties Property R/O Value Type What it is download fonts font substitution kind Valid values: • complete • none • subset Valid values:
  • Adobe 26001360 | Scripting Guide - Page 106
    font applied to it -- Position the text frames into three columns -- tell application "Illustrator CS" activate make new document set fontCount to count fonts set x to 1 set startX to 10 set startY to (height of document 1) - 10 repeat with i from 1 to fontCount make new text frame in document 1 set
  • Adobe 26001360 | Scripting Guide - Page 107
    Adobe Illustrator CS Scripting Guide 107 GIF export options Options which may be supplied when exporting a document as a GIF file. See the export command in the command reference for additional
  • Adobe 26001360 | Scripting Guide - Page 108
    necessary to specify values for all properties. Default values will be provided for any properties not specified. Example 13.1 This handler processes all Illustrator files in a specific folder, exporting each as a scaled GIF image. Note that the class property is specified in the record to ensure
  • Adobe 26001360 | Scripting Guide - Page 109
    Adobe Illustrator CS Scripting Guide 109 tell application "Finder" to ¬ set fileName to name of aFile set newFilePath to destinationPath & fileName & ".gif" tell application "Illustrator CS" open aFile export current document to file newFilePath as GIF with options ¬ {class:GIF export options ¬ ,
  • Adobe 26001360 | Scripting Guide - Page 110
    110 AppleScript Reference gradient, gradients A gradient definition or gradient definitions. Gradients are contained in documents. Table 4.23 gradient, gradients - Elements Element: Refer to by: gradient stop index, before/after, range, test Table 4.24 gradient, gradients - Properties
  • Adobe 26001360 | Scripting Guide - Page 111
    Adobe Illustrator CS Scripting Guide 111 Notes Illustrator's gradient object represents a gradient as defined in the Illustrator application. Additional gradients may be created by the user within Illustrator or via a script. Example 14.1 This example shows how to create a linear RGB gradient.
  • Adobe 26001360 | Scripting Guide - Page 112
    a record which contains the color component values of a gradient color swatch. It is used for specifying and retrieving color information from an Illustrator document or from page items in a document. Example 15.1 This example demonstrates how to set a path item's fill color to a gradient color
  • Adobe 26001360 | Scripting Guide - Page 113
    Adobe Illustrator CS Scripting Guide 113 gradient stop, gradient stops A gradient stop definition or definitions contained in a specific gradient. Table 4.26 gradient stop, gradient stops - Properties Property R/O Value type What
  • Adobe 26001360 | Scripting Guide - Page 114
    gradient stops. -- This handler reverses the colors in gradient identified -- by the gradientRef parameter on ReverseGradientColors(gradientRef) tell application "Illustrator CS" -- Get a list of the gradient's colors set colorList to color of every gradient stop of gradientRef -- Tell AppleScript
  • Adobe 26001360 | Scripting Guide - Page 115
    Adobe Illustrator CS Scripting Guide 115 gradient stop info Gradient stop information of a specific gradient, returned by the entire gradient property of a gradient. Table 4.27 gradient stop info - Properties Property R/O
  • Adobe 26001360 | Scripting Guide - Page 116
    116 AppleScript Reference tell application "Illustrator CS" if not (exists gradient pGradientName in current document) then set entireGradient to {{midpoint:50.0, ramp point:0.0 ¬ , color:{cyan:0.0, magenta:0.0, yellow:0.0, black:100.0}} ¬ , {midpoint:50.0,
  • Adobe 26001360 | Scripting Guide - Page 117
    Adobe Illustrator CS Scripting Guide 117 Valid Commands • count • delete • duplicate • exists • move • rotate • scale • transform • translate Notes Note that it is not necessary to set the type of the content variable before binding. Illustrator automatically sets the type to graph. Example 18.1
  • Adobe 26001360 | Scripting Guide - Page 118
    of this graphic style All of the properties of this object returned as a record Valid Commands • apply • count • delete • exists Notes Illustrator's graphic styles can be accessed from scripting, but cannot be created. You cannot delete default graphic styles. Example 19.1 -- Duplicate and group
  • Adobe 26001360 | Scripting Guide - Page 119
    Adobe Illustrator CS Scripting Guide 119 -- Check for empty selection if selectedItems is not {} then tell application "Illustrator CS" -- Style for selection?") as string if styleName is not "" then tell application "Illustrator CS" (* The chosen graphic style is applied to the list of items
  • Adobe 26001360 | Scripting Guide - Page 120
    class is used to define a record which contains the tint value of a gray color. It is used for specifying and retrieving color information from an Illustrator document or from page items in a document. Gray colors are specified using a real value that ranges from 0.0 to 100.0 for the tint of color
  • Adobe 26001360 | Scripting Guide - Page 121
    Adobe Illustrator CS Scripting Guide 121 Table 4.31 group item, group items - Elements (Continued) Element: Refer to by: plugin item raster item the contents of a vector art file if you provide a file specification to the vector file (EPS or PDF) in the with data parameter of the make 12 Aug 03
  • Adobe 26001360 | Scripting Guide - Page 122
    a new group item from the contents of a vector art file, either EPS or PDF. -- Create a new group whose contents will be the contents of a vector art to the vector file to be placed on EmbedVectorFile(fileRef) tell application "Illustrator CS" set groupRef to make new group item in document 1 with
  • Adobe 26001360 | Scripting Guide - Page 123
    Adobe Illustrator CS Scripting Guide 123 Example 21.3 This example demonstrates how to . -- Create a group of paths, then clip the group to the first path in the group tell application "Illustrator CS" -- Create a group to contain the paths to be clipped set groupRef to make new group item in
  • Adobe 26001360 | Scripting Guide - Page 124
    124 AppleScript Reference make new rectangle at end of groupRef with properties ¬ {bounds:{200, 250, 300, 150}, fill color:{green:255}, stroked:false} -- Get a little fancy and create a rotated star at the center of the group set pathRef to make new star at beginning of groupRef with properties ¬
  • Adobe 26001360 | Scripting Guide - Page 125
    Guide 125 Illustrator preferences Specifies preferences for Illustrator. Table 4.33 Illustrator preferences - Properties Property R/O Value type best type class type default type properties R/O type class R/O type class R/O type class record PDF file options R/O PDF options Photoshop
  • Adobe 26001360 | Scripting Guide - Page 126
    the linked image files are to be included in the saved document; Only for Illustrator 7 or later documents; default: false Default value is preserved If true, the file should be saved as a PDF compatible file (version 10 or later) Valid Commands • save Notes This class is used to define a record
  • Adobe 26001360 | Scripting Guide - Page 127
    Adobe Illustrator CS Scripting Guide 127 Example 22.1 This handler processes a folder of Illustrator files, saving each with Illustrator 7 compatibility. Note that the class property is specified in the record to ensure that Illustrator can determine the save option class. -- fileList is a list
  • Adobe 26001360 | Scripting Guide - Page 128
    Example 23.1 -- Ink Lists --- Get the name of every ink in document 1 -- Make a list of names for display -- Display the list of names -- tell application "Illustrator CS" set inkNames to "" if not (exists document 1) then error "There is no available document." get the name of every item of inks of
  • Adobe 26001360 | Scripting Guide - Page 129
    Adobe Illustrator CS Scripting Guide 129 Table 4.36 ink properties - Properties (Continued) Property R/O Value Type What it is dot shape frequency kind printing status trapping trapping order Unicode text real
  • Adobe 26001360 | Scripting Guide - Page 130
    130 AppleScript Reference Table 4.37 insertion point - Elements (Continued) Elements Refer to by paragraph text word by numeric index, as a range of elements, before/after another element, satisfying a test by numeric index, as a range of elements, before/after another element, satisfying a
  • Adobe 26001360 | Scripting Guide - Page 131
    Adobe Illustrator CS Scripting Guide 131 string value is to insert the string in the text frame at the insertion point's location. Setting the contents to an empty string has no affect. Example 24.1 This example shows several ways of working with insertion points. tell application "Illustrator
  • Adobe 26001360 | Scripting Guide - Page 132
    132 AppleScript Reference job options The print job options. Table 4.39 job options - Properties Property R/O Value Type bitmap resolution real collate boolean copies designation file path name print area print as bitmap reverse pages integer Valid values: • all layers • visible layers •
  • Adobe 26001360 | Scripting Guide - Page 133
    Adobe Illustrator CS Scripting Guide 133 -- Make new text frame in the new layer (non-visible) -- Make the new layer non visible -- Print all layers -- Print only visible layers -- Print
  • Adobe 26001360 | Scripting Guide - Page 134
    134 AppleScript Reference JPEG export options Options which may be supplied when exporting a document as a JPEG file. See the export command in the command reference for additional details. Table 4.40 JPEG export options - Properties Property R/O Value type antialiasing boolean artboard
  • Adobe 26001360 | Scripting Guide - Page 135
    Adobe Illustrator CS Scripting Guide 135 Example 26.1 This handler processes all Illustrator files in a specific folder, exporting each file as a mediumquality JPEG image. Note that the class property is specified in the record to ensure that Illustrator can determine the export option class. --
  • Adobe 26001360 | Scripting Guide - Page 136
    136 AppleScript Reference layer, layers A layer or list of layers. Layers may contain nested layers, which are called sublayers in the user interface. Table 4.41 layer, layers - Elements Element: compound path item graph item group item layer mesh item page item path item placed item plugin item
  • Adobe 26001360 | Scripting Guide - Page 137
    Adobe Illustrator CS Scripting Guide 137 Table 4.42 layer, layers - Properties (Continued) Property R/O Value type What it is blend mode class color container default type dim placed images has selected
  • Adobe 26001360 | Scripting Guide - Page 138
    If true, slices should be preserved; default: false If true, this layer is visible Valid Commands • count • delete • duplicate • exists • make • move Notes Illustrator's layer object contains all of the page items in the specific layer as elements. Your script can access page items as elements of
  • Adobe 26001360 | Scripting Guide - Page 139
    Adobe Illustrator CS Scripting Guide 139 -- Move the 2nd layer to the top of the stacking order tell application "Illustrator CS" if (count the layer stack -- then create a new path in the layer tell application "Illustrator CS" set layerRef to make layer at document 1 with properties{name: "
  • Adobe 26001360 | Scripting Guide - Page 140
    140 AppleScript Reference line A line or lines of text in a text frame. Table 4.43 line - Elements Elements Refer to by character style character insertion point line paragraph style paragraph text word by name, by numeric index, as a range of elements, before/after another element,
  • Adobe 26001360 | Scripting Guide - Page 141
    Adobe Illustrator CS Scripting Guide 141 Table 4.44 line - Properties (Continued) Property R/O Value Type What it is alternate glyphs alternate ligature auto leading baseline direction baseline position baseline shift best
  • Adobe 26001360 | Scripting Guide - Page 142
    horizontal scaling factor expressed as a percentage (100 = 100%) The index of this instance of the object If true, the Japanese OpenType support supports the italic style kerning kerning method real Valid values: • auto • none • optical Controls the spacing between two characters, in thousandths
  • Adobe 26001360 | Scripting Guide - Page 143
    Adobe Illustrator CS Scripting Guide 143 Table 4.44 line - Properties (Continued) Property R/O Value Type What it is language leading length ligature no break OpenType position ordinals ornaments overprint fill overprint
  • Adobe 26001360 | Scripting Guide - Page 144
    144 Table 4.44 line - Properties (Continued) Property R/O Value Type rotation selection size story stroke color stroke weight stylistic alternates real R/O list of text, texts real R/O story color info real boolean swash TCY horizontal boolean integer TCY vertical integer titling boolean
  • Adobe 26001360 | Scripting Guide - Page 145
    Adobe Illustrator CS Scripting Guide 145 Table 4.44 line - Properties (Continued) Property R/O Value Type What Lines of text cannot be created. When the contents property of a text frame is modified, Illustrator will create text lines as it reflows the text within the text frame. Example 28.1
  • Adobe 26001360 | Scripting Guide - Page 146
    red all lines of text containing more than 80 characters tell application "Illustrator CS" if (count text frames in document 1) > 0 then fill color of every line of text frame i of document 1 ¬ whose length > 10) to {red:255.0} end repeat end if end tell matrix A transformation matrix specification
  • Adobe 26001360 | Scripting Guide - Page 147
    Adobe Illustrator CS Scripting Guide 147 Valid Commands • concatenate matrix • concatenate rotation matrix • concatenate scale matrix command. -- Scale all art in a document to 50% vertical size tell application "Illustrator CS" if (count page items in document 1) > 0 then set scaleMatrix to get
  • Adobe 26001360 | Scripting Guide - Page 148
    time. The following script demonstrates how to combine multiple matrices together. -- Scale, rotate, and translate all art in a document tell application "Illustrator CS" if (count page items in document 1) > 0 then set matrixDef to ¬ get scale matrix horizontal scale 100.0 vertical scale 50.0 set
  • Adobe 26001360 | Scripting Guide - Page 149
    Adobe Illustrator CS Scripting Guide 149 Valid Commands • count • delete • duplicate • exists • move • translate • -- Set the fill color of the top rectangle to no color -- tell application "Illustrator CS" activate make new document make new rectangle in document 1 with properties {position:{200
  • Adobe 26001360 | Scripting Guide - Page 150
    If true, all text objects for documents saved with legacy texts (for documents from version 10 or earlier of Illustrator); Default: false Example 31.1 -- Open Options --- Allow the user to choose an Illustrator file with legacy text -- Open the file with automatic update of legacy text -- tell me
  • Adobe 26001360 | Scripting Guide - Page 151
    Adobe Illustrator CS Scripting Guide 151 Table 4.49 page item, page items - Properties Property R/O Value type What it is best type blend mode class container control bounds default type editable
  • Adobe 26001360 | Scripting Guide - Page 152
    this object is selected If true, preserve slices The value of the Adobe URL tag assigned to this page item The visibility variable to which this The object's visible bounds, including stroke width of any objects in the illustration The width of the page item, calculated from the geometric bounds If
  • Adobe 26001360 | Scripting Guide - Page 153
    Adobe Illustrator CS Scripting Guide 153 Table 4.49 page item, page items - Properties ( in a layer. -- Move the last page item of layer 1 to the top of the stacking order tell application "Illustrator CS" if (count page items of layer 1 of document 1) > 1 then move last page item of layer 1
  • Adobe 26001360 | Scripting Guide - Page 154
    Page Marks --- Make sure a document is available -- Add page mark options -- Print the document with the page mark options -- tell application "Illustrator CS" activate if not (exists document 1) then error "There is no available document." set pageMarkOptions to {class:page marks options, color
  • Adobe 26001360 | Scripting Guide - Page 155
    Adobe Illustrator CS Scripting Guide 155 paper This class contains information about the paper to be used for printing. Table 4.51 paper - Properties Property R/O Value Type name properties Unicode text
  • Adobe 26001360 | Scripting Guide - Page 156
    Get the paper sizes of printer 1 -- For each paper size, get the name and height/width -- Display the printer info -- tell application "Illustrator CS" activate make new document set printerName to (name of item 1 of printers) as string set printerProperties to properties of (get properties of item
  • Adobe 26001360 | Scripting Guide - Page 157
    Adobe Illustrator CS Scripting Guide 157 paragraph, paragraphs A paragraph or list of paragraphs of text in the contents of a text art object. Table 4.54 paragraph - Elements Elements Refer to by
  • Adobe 26001360 | Scripting Guide - Page 158
    158 AppleScript Reference Table 4.55 paragraph - Properties (Continued) Property R/O Value Type What it is alignment alternate glyphs auto leading auto leading amount auto TCY baseline direction baseline position baseline shift best type BunriKinshi Valid values: • bottom • center • icf
  • Adobe 26001360 | Scripting Guide - Page 159
    Adobe Illustrator CS Scripting Guide 159 Table 4.55 paragraph - Properties (Continued) Property R/O Value Type What it is Burasagari type capitalization character offset class R/O connection forms container R/O contents contextual ligature default
  • Adobe 26001360 | Scripting Guide - Page 160
    hyphens (1). Valid values: (0.0-1.0) Size of the hyphenation zone The index of this instance of the object If true, the Japanese OpenType support supports the italic style justification kerning kerning method Valid values: • center • full justify last line center • full justify last line full
  • Adobe 26001360 | Scripting Guide - Page 161
    Adobe Illustrator CS Scripting Guide 161 Table 4.55 paragraph - Properties (Continued) Property R/O Value Type What it is Kinsoku Kinsoku order language leading leading type left indent length ligature maximum consecutive
  • Adobe 26001360 | Scripting Guide - Page 162
    162 AppleScript Reference Table 4.55 paragraph - Properties (Continued) Property R/O Value Type maximum letter spacing real maximum word spacing real minimum after hyphen minimum before hyphen integer integer minimum glyph scaling real minimum hyphenated word size minimum letter spacing
  • Adobe 26001360 | Scripting Guide - Page 163
    Adobe Illustrator CS Scripting Guide 163 Table 4.55 paragraph - Properties (Continued) Property R/O Value Type What it is selection single word justification size space after space before story stroke color stroke
  • Adobe 26001360 | Scripting Guide - Page 164
    (multiple text lines fit into a space meant for one) lines The Wari-Chu scale Valid Commands • count • delete • duplicate • exists • make Notes Illustrator's text can be accessed using the character, insertion point, word, line, paragraph and text classes. All text is contained within text frames
  • Adobe 26001360 | Scripting Guide - Page 165
    Adobe Illustrator CS Scripting Guide 165 The paragraph class has additional properties frame to some text containing three paragraphs -- Resize and justify the paragraphs -- tell application "Illustrator CS" activate make new document make new rectangle in document 1 with properties {position:{100
  • Adobe 26001360 | Scripting Guide - Page 166
    166 paragraph style, paragraph styles A named style that remembers paragraph attributes. AppleScript Reference Table 4.56 paragraph style - Properties Property R/O Value Type What it is best type class default type aki left aki right alignment alternate glyphs auto leading auto leading amount
  • Adobe 26001360 | Scripting Guide - Page 167
    Adobe Illustrator CS Scripting Guide 167 Table 4.56 paragraph style - Properties (Continued) Property R/O Value Type What it is baseline direction baseline position baseline shift best type R/O BunriKinshi Burasagari type capitalization
  • Adobe 26001360 | Scripting Guide - Page 168
    hyphens (1); Valid values: (0.0-1.0) Size of the hyphenation zone The index of this instance of the object If true, the Japanese OpenType font supports italic text justification Valid values: • center • full justify • full justify last line center • full justify last line left • full justify last
  • Adobe 26001360 | Scripting Guide - Page 169
    Adobe Illustrator CS Scripting Guide 169 Table 4.56 paragraph style - Properties (Continued) Property R/O Value Type What it is kerning method Kinsoku Kinsoku order KurikaeshiMojiShori language leading leading type left indent
  • Adobe 26001360 | Scripting Guide - Page 170
    170 AppleScript Reference Table 4.56 paragraph style - Properties (Continued) Property R/O Value Type What it is ligature maximum consecutive hyphens maximum glyph scaling maximum letter spacing maximum word spacing minimum after hyphen minimum before hyphen minimum glyph scaling minimum
  • Adobe 26001360 | Scripting Guide - Page 171
    Adobe Illustrator CS Scripting Guide 171 Table 4.56 paragraph style - Properties (Continued) Property R/O Value Type What it is right indent roman hanging rotation single word justification size space after space
  • Adobe 26001360 | Scripting Guide - Page 172
    and justify the paragraphs -- Make a new paragraph style with a set of options -- Apply the paragraph style to the text of the text frame -- tell application "Illustrator CS" 12 Aug 03
  • Adobe 26001360 | Scripting Guide - Page 173
    Adobe Illustrator CS Scripting Guide 173 activate make new document make new rectangle in document 1 with properties {position:{100, 400}, width:400, height:200} set areaText to make new text
  • Adobe 26001360 | Scripting Guide - Page 174
    clipping closed entire path evenodd fill color fill overprint filled guides note polarity resolution selected path points stroke cap stroke color overprinted If true, the path should be filled If true, this path is a guide object The note text assigned to the path. Used in the creation of compound
  • Adobe 26001360 | Scripting Guide - Page 175
    Adobe Illustrator CS Scripting Guide 175 Table 4.58 path item, path items - Properties demonstrated in this example. -- Set the stroke of the first path to a red 4 point line tell application "Illustrator CS" if (count path items of document 1) > 0 then set properties of path item 1 of document 1
  • Adobe 26001360 | Scripting Guide - Page 176
    176 AppleScript Reference path point, path points A point or points on a specific path. Each path point is made up of a fixed point (anchor) and a pair of handles (left direction and right direction). Table 4.59 path point, path points - Properties Property R/O Value type What it is anchor
  • Adobe 26001360 | Scripting Guide - Page 177
    Adobe Illustrator CS Scripting Guide 177 • duplicate • exists • make Notes A path point represents modified. -- Move the first point in a path to the same spot as the last point tell application "Illustrator CS" if (count path items of document 1) > 0 then set lastAnchor to anchor of last path
  • Adobe 26001360 | Scripting Guide - Page 178
    Example 39.1 This example demonstrates how to get every path point for a specific path item. -- Returns the path points of the first path tell application "Illustrator CS" if (count path items of document 1) > 0 then set pointList to entire path of path item 1 of document 1 end if end tell 12 Aug
  • Adobe 26001360 | Scripting Guide - Page 179
    Adobe Illustrator CS Scripting Guide 179 pattern, patterns A pattern definition or list of definitions contained in a document. Table 4.61 pattern so in this record) Valid Commands • count • delete • duplicate • exists Notes Illustrator's pattern object represents a pattern as defined in the
  • Adobe 26001360 | Scripting Guide - Page 180
    40.1 The following example demonstrates how the name of a pattern can be retrieved. -- Returns the name of the first pattern tell application "Illustrator CS" set pathname to name of pattern 1 of document 1 end tell pattern color info A pattern color specification, used to specify a pattern
  • Adobe 26001360 | Scripting Guide - Page 181
    Adobe Illustrator CS Scripting Guide 181 Table 4.62 pattern color info - Properties (Continued) Property R/O "Illustrator CS" set default fill color of document 1 to {pattern:pattern 1 of document 1} end tell PDF options Options which may be supplied when opening a PDF file . Table 4.63 PDF
  • Adobe 26001360 | Scripting Guide - Page 182
    . Default values will be provided for any properties not specified. Example 42.1 This handler processes a folder of Illustrator files, saving each file as a PDF file, with Illustrator editability and Acrobat 6 compatibility. Note that the class property is specified in the record to ensure that
  • Adobe 26001360 | Scripting Guide - Page 183
    Adobe Illustrator CS Scripting Guide 183 set user interaction level to never interact set page of PDF file options of settings to 2 open file (theFile as string) end tell PDF save options Options which may be supplied when saving a document as an Acrobat PDF file. See the save command in the
  • Adobe 26001360 | Scripting Guide - Page 184
    184 AppleScript Reference Table 4.64 PDF save options - Properties (Continued) Property R/O Value Type What Tile size when compressing with JPEG2000; default: 256 The version of the Acrobat file format to create; default: Acrobat 6 If true, the line art and text should be compressed; default:
  • Adobe 26001360 | Scripting Guide - Page 185
    Adobe Illustrator CS Scripting Guide 185 Table 4.64 PDF save options - Properties (Continued) Property R/O Value ; default: true boolean If true, enable plaintext metadata 128-bit; available only for Acrobat 6; default: false real Include a subset of fonts when less than this percentage of
  • Adobe 26001360 | Scripting Guide - Page 186
    186 AppleScript Reference Table 4.64 PDF save options - Properties (Continued) Property R/O Value Type nodownsample Custom offset (in points) for using the custom paper; default: 0.0 If true, the PDF file should be saved for fast web view; default: false If true, draw page information;
  • Adobe 26001360 | Scripting Guide - Page 187
    Adobe Illustrator CS Scripting Guide Table 4.64 PDF save options - Properties (Continued) Property R/O Value Type page marks style PDF preset Valid values: • japanese • Roman Unicode text pdfstyle permission password Unicode text Unicode text preserve editability boolean printer resolution
  • Adobe 26001360 | Scripting Guide - Page 188
    pdf" tell application "Illustrator CS" open aFile save current document in file newFilePath as pdf ¬ with options {class:PDF save options ¬ , compatibility:Acrobat ?" SaveFilesAsPDF(fileList, destinationFolder) Photoshop options You can supply options when opening a Photoshop file. See the open
  • Adobe 26001360 | Scripting Guide - Page 189
    Adobe Illustrator CS Scripting Guide 189 Table 4.65 Photoshop options - Properties Property R/O Value type pixel aspect ratio correction boolean preserve image maps boolean preserve layers boolean preserve slices boolean properties record What it is
  • Adobe 26001360 | Scripting Guide - Page 190
    : Photoshop 8 ) If true, compound shapes should be exported as shape layers; default: true If true, text objects should be exported ast editable text layers; default: true If true, an ICC profile should be embedded in the exported image; default: false If true, the hidden layers of the Illustrator
  • Adobe 26001360 | Scripting Guide - Page 191
    Adobe Illustrator CS Scripting Guide 191 Table 4.66 Photoshop export options - Properties (Continued) Property R/O Value type What it is write layers boolean If true, the layers of the Illustrator document should be preserved in the exported image; default: true Notes This class is used to
  • Adobe 26001360 | Scripting Guide - Page 192
    in an external file) placed in a document. A placed item must correspond to a file containing vector-graphic data, such as a PICT, EPS or PDF file Note: This object class inherits all valid properties from the page item class. . Table 4.67 placed item, placed items - Properties Property R/O Value
  • Adobe 26001360 | Scripting Guide - Page 193
    Adobe Illustrator CS Scripting Guide 193 Valid Commands • count • delete • duplicate • exists • move • rotate • scale • transform • translate Notes When you create a placed item, Illustrator may display a dialog. To avoid this dialog, check the box to turn the warning off the first time the
  • Adobe 26001360 | Scripting Guide - Page 194
    194 plugin item, plugin items An art object or objects created by an Illustrator plug-in. AppleScript Reference Note: This object class inherits all valid properties from the page item class. Table 1: plugin item, plugin items - Properties Property R/O Value
  • Adobe 26001360 | Scripting Guide - Page 195
    Adobe Illustrator CS Scripting Guide 195 Table 4.68 PNG24 export options - Properties (Continued) Property R/O Value type What it is matte matte color saving as HTML transparency vertical scaling boolean RGB
  • Adobe 26001360 | Scripting Guide - Page 196
    196 AppleScript Reference tell application "Illustrator CS" open aFile export current document to file newFilePath as PNG24 ¬ with options {class:PNG24 export options ¬ , horizontal scaling:50.0 ¬ , vertical scaling:50.0 ¬ , saving as
  • Adobe 26001360 | Scripting Guide - Page 197
    Adobe Illustrator CS Scripting Guide 197 Table 4.69 PNG8 export options - Properties (Continued) Property R/O Value type What it is color dither color reduction dither percent horizontal scaling interlaced matte matte
  • Adobe 26001360 | Scripting Guide - Page 198
    aFile in fileList tell application "Finder" to set fileName to name of aFile set newFilePath to destinationPath & fileName & ".png" tell application "Illustrator CS" open aFile export current document to file newFilePath as PNG8 ¬ with options {class:PNG8 export options ¬ , color count:64 ¬ , color
  • Adobe 26001360 | Scripting Guide - Page 199
    Adobe Illustrator CS Scripting Guide 199 polygon A class used to create a multi-sided path in an Illustrator document. This class of sides for the polygon; default: 8 Valid Commands • make Notes Illustrator's polygon object is available to use with the make command exclusively. The class
  • Adobe 26001360 | Scripting Guide - Page 200
    200 AppleScript Reference postscript options Specifies the options for printing to a PostScript language printer or imagesetter. Table 4.71 postscript options - Properties Property R/O Value Type binary printing boolean compatible shading boolean force continuous tone image compression
  • Adobe 26001360 | Scripting Guide - Page 201
    Adobe Illustrator CS Scripting Guide 201 Example 50.1 -- PPD File --- Make a new document -- Get the PPDs -- Get the name, PS Level, and file path of the first PPD -- Make a new text frame with the PPD info as its contents -- tell application "Illustrator CS" activate make new document set
  • Adobe 26001360 | Scripting Guide - Page 202
    and frequency -- For each spot function, get the name and the function -- Make a new text frame with the PPD info as its contents -- tell application "Illustrator CS" activate make new document set PPDFiles to PPDs set PPDName to name of item 1 of PPDFiles set PPDProperties to get properties of item
  • Adobe 26001360 | Scripting Guide - Page 203
    Adobe Illustrator CS Scripting Guide 203 print options Specifies the print options Table 4.74 the printer preset to use The printer name Example 52.1 -- Print Options --- Make new document -- Add 10 symbol items to the document -- Note: if you know a better way to scatter the symbols back and
  • Adobe 26001360 | Scripting Guide - Page 204
    204 AppleScript Reference set theDesktop to (path to desktop as string) tell application "Illustrator CS" activate make new document repeat with i from 1 to 10 round (i / 2 - (round (i / 2) rounding down)) rounding up make new symbol item in document 1 with properties {symbol:symbol i of document
  • Adobe 26001360 | Scripting Guide - Page 205
    Adobe Illustrator CS Scripting Guide 205 name of every item of printers as list repeat with theName in the result set printerList to printerList & theName & return end repeat set user
  • Adobe 26001360 | Scripting Guide - Page 206
    offset minimum height offset minimum paper height minimum paper width minimum width offset paper sizes PostScript boolean If true, the printer supports binary printing Valid values: The printer color capability • black and white output • color output • grayscale output boolean If true, the
  • Adobe 26001360 | Scripting Guide - Page 207
    Adobe Illustrator CS Scripting Guide 207 Table 4.76 printer properties - Properties (Continued) Property R/O Value Type raster item is bound boolean If true, the raster item is embedded within the illustration file specification The file containing the raster item, if it is stored externally
  • Adobe 26001360 | Scripting Guide - Page 208
    or copying and pasting an existing raster item. Note that it is not necessary to set the type of the content variable before binding. Illustrator automatically sets the type to image. Example 54.1 This script creates a new raster item using a linked file selected by the user. -- Make a new raster
  • Adobe 26001360 | Scripting Guide - Page 209
    Adobe Illustrator CS Scripting Guide 209 rectangle A class used to create a rectangular path in an Illustrator document. This class can be specified at the time of creation. Note: Remember that in the Illustrator coordinate system, vertical coordinates increase from bottom to top, which is the
  • Adobe 26001360 | Scripting Guide - Page 210
    210 AppleScript Reference Example 55.2 The values in a rectangle can be used in a number of ways in a script. tell application "Illustrator CS" -- Get the bounds of a page item set itemBounds to geometric bounds of page item 1 of document 1 --> {100.0, 400.0, 300.0, 200.0} -- Assigns the four
  • Adobe 26001360 | Scripting Guide - Page 211
    Adobe Illustrator CS Scripting Guide 211 RGB color info An RGB color specification, used to and you specify the color value for a page item in that document using RGB color info, Illustrator will translate the RGB color specification into a CMYK color specification. The same thing happens if the
  • Adobe 26001360 | Scripting Guide - Page 212
    creation. Example 57.1 The following script demonstrates how to create a rounded rectangle that is square. -- Make a rounded rectangle tell application "Illustrator CS" set pathRef to make new rounded rectangle in document 1 with properties ¬ {bounds:{50.0, 200.0, 200.0, 50.0}, horizontal radius
  • Adobe 26001360 | Scripting Guide - Page 213
    Adobe Illustrator CS Scripting Guide 213 screen properties Screen information Table 4.81 screen angle, and frequency -- Display the results of the PPD info in a text frame -- tell application "Illustrator CS" activate make new document set PPDFiles to PPDs set PPDName to name of item 1 of PPDFiles
  • Adobe 26001360 | Scripting Guide - Page 214
    first PPD -- For each spot function, get the name and the function -- Display the results of the PPD info in a text frame -- tell application "Illustrator CS" activate make new document set PPDFiles to PPDs set PPDName to name of item 1 of PPDFiles set PPDProperties to get properties of item 1 of
  • Adobe 26001360 | Scripting Guide - Page 215
    Adobe Illustrator CS Scripting Guide separation screen color separation screen Table 4.83 separation screen - Properties Property R/O Value Type name properties Unicode text screen properties 215 What it is The color
  • Adobe 26001360 | Scripting Guide - Page 216
    . Example 60.1 The script below demonstrates how a spot color can be created. -- Make a new spot with name and color properties tell application "Illustrator CS" -- set up the appropriate color record for the document color space set docColorSpace to color space of document 1 if (docColorSpace is
  • Adobe 26001360 | Scripting Guide - Page 217
    Adobe Illustrator CS Scripting Guide 217 spot color info A spot color specification, used to -- Make a new spot color and apply a 50% tint to the default stroke color tell application "Illustrator CS" -- create a document with RGB color space make new document with properties {color space:RGB} set
  • Adobe 26001360 | Scripting Guide - Page 218
    at the time of creation.time of creation. Example 62.1 The following script demonstrates how to create a star. -- Make a 16-pointed star tell application "Illustrator CS" make new star in document 1 with properties ¬ {center point:{200.0, 500.0}, inner radius:70, radius:100, point count:16} end tell
  • Adobe 26001360 | Scripting Guide - Page 219
    Adobe Illustrator CS Scripting Guide 219 story, stories A contiguous block of text with a specified text range. A story can contain one or more text frames; if more-the multiple text frames
  • Adobe 26001360 | Scripting Guide - Page 220
    enough to overflow to text frame 2 -- Count the number of stories -- Add a new text frame -- Count the number of stories -- tell application "Illustrator CS" activate make new document make new rectangle in document 1 with properties {position:{200, 600}, height:30, width:50} make new text frame in
  • Adobe 26001360 | Scripting Guide - Page 221
    Adobe Illustrator CS Scripting Guide 221 SVG export options Options which may be supplied when exporting a document as an SVG file. See the export command in the command reference for
  • Adobe 26001360 | Scripting Guide - Page 222
    boolean boolean boolean boolean If true, variables and datasets should be included; default: false If true, the Adobe namespace should be included; default: false If true, Illustrator editing capabilities should be preserved when exporting the document; default: false If true, slice data should be
  • Adobe 26001360 | Scripting Guide - Page 223
    Adobe Illustrator CS Scripting Guide 223 , embed raster images:true} close current document saving no end tell end repeat end SaveFilesAsSVG -- Call handler set sourceFolder to choose folder with prompt "
  • Adobe 26001360 | Scripting Guide - Page 224
    Valid Commands • count • delete • duplicate • exists • make Notes The swatches correspond to the swatch palette in Illustrator's user interface. Additional swatches can be created either manually by a user or by a script. The swatch can hold all types of color data (i.e., pattern, gradient, CMYK
  • Adobe 26001360 | Scripting Guide - Page 225
    Adobe Illustrator CS Scripting Guide 225 Table 4.91 symbol, symbols - Properties ( apply graphic style (i + 1) of document 1 to the result end repeat delay 2 repeat with i from 1 to 10 make new symbol in document 1 with properties {name:("symbol" & i as string), source art:page item i of document
  • Adobe 26001360 | Scripting Guide - Page 226
    rotate • scale • transform • translate Example 67.1 -- Symbol Items --- Make a new document -- Add 10 symbol items to the document tell application "Illustrator CS" activate make new document repeat with i from 1 to 10 round (i / 2 - (round (i / 2) rounding down)) rounding up make new symbol item in
  • Adobe 26001360 | Scripting Guide - Page 227
    Adobe Illustrator CS Scripting Guide 227 tab stop info Tab stop information for a paragraph. Table 4.93 tab stop info for a paragraph. -- Return the tab stops of the first paragraph tell application "Illustrator CS" set allTabs to tab stops of paragraph 1 of text frame 1 of document 1 end tell 12 Aug
  • Adobe 26001360 | Scripting Guide - Page 228
    .1 The following script demonstrates how to get the tags for a page item. -- Get the tags for the first page item in the document tell application "Illustrator CS" make rectangle in document 1 with properties {name: "rectPath"} 12 Aug 03
  • Adobe 26001360 | Scripting Guide - Page 229
    Adobe Illustrator CS Scripting Guide 229 set URL of path item "rectPath" of document 1 to "http://www.adobe.com/" get properties of tags of path item "rectPath" of document 1 end tell text, texts Any text in the contents of a text frame. Table 4.95
  • Adobe 26001360 | Scripting Guide - Page 230
    set to 12-point type in the current document will be changed to 18-point type. -- Change all 12pt text to 18pt tell application "Illustrator CS" set textArtItemCount to count text frames of document 1 -- Loop through all the text frames repeat with itemCount from 1 to textArtItemCount set textRef to
  • Adobe 26001360 | Scripting Guide - Page 231
    Adobe Illustrator CS Scripting Guide 231 text frame, text frames A text art object or objects. From the user interface, this is text created with the Text tool. Table 4.97 text
  • Adobe 26001360 | Scripting Guide - Page 232
    frame Valid Commands • count • delete • duplicate • exists • make • move • rotate • scale • transform • translate Notes There are three types of text art in Illustrator, as specified by the text frame's kind property. See "Working with text art" on page 53 for more information on working with
  • Adobe 26001360 | Scripting Guide - Page 233
    Adobe Illustrator CS Scripting Guide 233 It is not necessary to set the type of the content variable before binding. Illustrator point text frame -- Display the count of text frames -- tell application "Illustrator CS" activate make new document make new rectangle in document 1 with properties
  • Adobe 26001360 | Scripting Guide - Page 234
    234 AppleScript Reference make new text frame in document 1 with properties {name:"PointText", contents:"Text Frame 3"} set the position of text frame "PointText" of document 1 to {400, 700} delay 1 set user interaction level to interact with all display dialog ("Text Frame Count: " & (count text
  • Adobe 26001360 | Scripting Guide - Page 235
    Adobe Illustrator CS Scripting Guide 235 Table 4.100 variable, variables - Properties (Continued) Property R/O Value type What • exists • make view, views A document view or list of views in an Illustrator document. Table 4.101 view, views - Properties Property R/O Value type best type R/O
  • Adobe 26001360 | Scripting Guide - Page 236
    record). The mode of display for this view The zoom factor of this view, where 100.0 is 100% Valid Commands • count • exists Notes Illustrator's view object represents a window view onto a document. New views cannot be created, but some properties of existing views can be modified, including the
  • Adobe 26001360 | Scripting Guide - Page 237
    Adobe Illustrator CS Scripting Guide 237 tell application "Illustrator CS" if (count documents) > 0 then set screen mode of view 1 of document 1 to full screen end if end tell 12 Aug 03
  • Adobe 26001360 | Scripting Guide - Page 238
    238 AppleScript Reference word A string of text in a text frame that is separated by whitespace. Table 4.102 word - Elements Elements Refer to by character style character insertion point line paragraph style paragraph text word by name, by numeric index, as a range of elements, before/after
  • Adobe 26001360 | Scripting Guide - Page 239
    Adobe Illustrator CS Scripting Guide 239 Table 4.103 word - Properties (Continued) Property R/O Value Type What it is alternate glyphs auto leading baseline direction baseline position baseline shift best type capitalization
  • Adobe 26001360 | Scripting Guide - Page 240
    used The character horizontal scaling factor expressed as a percentage (100 = 100%) The index of this instance of the object If true, the Japanese font supports italics controls the spacing between two characters, in thousandths of the em space The type of automatic kerning method to use 12 Aug 03
  • Adobe 26001360 | Scripting Guide - Page 241
    Adobe Illustrator CS Scripting Guide 241 Table 4.103 word - Properties (Continued) Property R/O Value Type What it is language leading length ligature no break OpenType position ordinals ornaments overprint fill overprint
  • Adobe 26001360 | Scripting Guide - Page 242
    242 AppleScript Reference Table 4.103 word - Properties (Continued) Property R/O Value Type proportional metrics boolean rotation selection size story stroke color stroke weight stylistic alternates real R/O list of text real R/O story color info real boolean swash boolean TCY horizontal
  • Adobe 26001360 | Scripting Guide - Page 243
    Adobe Illustrator CS Scripting Guide 243 Table 4.103 word - Properties (Continued) Property R/O Value The Wari-Chu scale Valid Commands • count • delete • duplicate • exists • make Notes Illustrator's text can be accessed using the character, insertion point, word, line, paragraph and text
  • Adobe 26001360 | Scripting Guide - Page 244
    in all text frames set searchString to text returned of ¬ (display dialog "Word to set color of?" default answer "the") tell application "Illustrator CS" set textArtItemCount to (count text frames in document 1) if (textArtItemCount > 0) then repeat with itemCounter from 1 to textArtItemCount if
  • Adobe 26001360 | Scripting Guide - Page 245
    Adobe Illustrator CS Scripting Guide 245 Command reference This section covers the commands in the Illustrator AppleScript dictionary table associated with each command. Column heading Parameters What it is Objects supported Returns What it means Constants, keywords, and values needed by the
  • Adobe 26001360 | Scripting Guide - Page 246
    4.104 apply - Parameters Parameters What it is Objects supported object reference to anything The brush or graphic style to center of the document -- and applies an art style to it tell application "Illustrator CS" make new document with properties {color space:CMYK} set docWidth to (width
  • Adobe 26001360 | Scripting Guide - Page 247
    Adobe Illustrator CS Scripting Guide apply character style Applies a character style to a specified text object(s). Table 4.105 apply character style - Parameters Parameters What it is Objects supported character style to anything [clearing overrides boolean] The character style object or
  • Adobe 26001360 | Scripting Guide - Page 248
    to type lower case/sentence case/title case/upper case What it is Objects supported The text object or objects to be operated upon The type of case AppleScript Reference the user with a "Save as" dialog tell application "Illustrator CS" activate close document 1 saving ask end tell 12 Aug 03
  • Adobe 26001360 | Scripting Guide - Page 249
    Adobe Illustrator CS Scripting Guide 249 colorize Colorize a raster item. Table 4.109 colorize - Parameters Parameters What it is object reference The raster item to colorize. Objects supported • raster item Returns nothing raster color CMYK color info/ gradient color info/ gray color info
  • Adobe 26001360 | Scripting Guide - Page 250
    112 concatenate scale matrix - Parameters Parameters What it is Objects supported matrix [horizontal scale real] [vertical scale real] The first a 75% horizontal scaling with an existing matrix tell application "Illustrator CS" set someMatrix to get identity matrix set newMatrix to concatenate
  • Adobe 26001360 | Scripting Guide - Page 251
    Adobe Illustrator CS Scripting Guide 251 concatenate translation matrix Concatenates a translation (specified by a horizontal and/or vertical supported • matrix Returns matrix Example 80.1 --This script combines a 25 point horizontal offset with an existing matrix tell application "Illustrator
  • Adobe 26001360 | Scripting Guide - Page 252
    it is The text frame object or objects to be operated upon Result: group item - null Objects supported Example 81.1 --This script converts all text art tell application "Illustrator CS" convert to paths (every text frame of document 1) end tell AppleScript Reference Returns copy Copies the
  • Adobe 26001360 | Scripting Guide - Page 253
    Adobe Illustrator CS Scripting Guide 253 Example 82.1 --This script copies the selected objects (if any) tell application "Illustrator CS" activate copy end tell count Counts the objects (elements) of the specified class (or the objects matching a test). Table 4.114 count - Parameters
  • Adobe 26001360 | Scripting Guide - Page 254
    -- are filled out of the total number in document 1 tell application "Illustrator CS" set pathCount to count every path item of document 1 set numberFilled Table 4.115 cut - Parameters Parameters What it is none nothing Objects supported • compound path item • group item • mesh item • path item
  • Adobe 26001360 | Scripting Guide - Page 255
    Adobe Illustrator CS Scripting Guide 255 tell application "Illustrator CS" activate cut end tell delete Removes an element from an object. Table 4.116 delete - Parameters Parameters What it is object reference or list (of object references) Object(s) to delete Objects supported • compound
  • Adobe 26001360 | Scripting Guide - Page 256
    display Display the dynamic data that has been captured in the dataset. Table 4.118 display - Parameters Parameters What it is Objects supported dataset The dataset object or objects to be operated upon • display Returns true/false do javascript Execute a JavaScript script. Table 4.119
  • Adobe 26001360 | Scripting Guide - Page 257
    Adobe Illustrator CS Scripting Guide 257 do script Plays an action from the Actions palette. Table 4.120 do script - Parameters Parameters What it is Objects supported Unicode text The name of the action to play (this is casesensitive) from Unicode text The name of the Action Set
  • Adobe 26001360 | Scripting Guide - Page 258
    Table 4.121 duplicate - Parameters Parameters What it is Objects supported object reference or list (of object references) [to location the first page item in document 1 to document 2 tell application "Illustrator CS" set pageItemRef to duplicate page item 1 of document 1 to beginning of document
  • Adobe 26001360 | Scripting Guide - Page 259
    Adobe Illustrator CS Scripting Guide 259 equal matrices Compares two matrices for equality. If equal, Returns returns a boolean which is true if the matrcies are equal. Table 4.122 equal matrices - Parameters Parameters What it is Objects supported matrix with matrix The first matrix for
  • Adobe 26001360 | Scripting Guide - Page 260
    is Objects supported object reference The document to export • document Returns nothing to [file] file specification as JPEG/Photoshop/ SVG (path to desktop folder as string) & "Sample.jpg" tell application "Illustrator CS" export current document to newFilePath as JPEG with options ¬ {class:JPEG
  • Adobe 26001360 | Scripting Guide - Page 261
    Adobe Illustrator CS Scripting Guide 261 export PDF preset This command exports PDF presets and saves all PDF presets to a file. Table 4.125 export PDF preset - Parameters Parameters What it is Objects supported document to file specification The document object or objects to be operated
  • Adobe 26001360 | Scripting Guide - Page 262
    you want to return a reference to or data from. [as class or list The type of data you (of classes)] want to retrieve. Objects supported Any Illustrator object Returns data from an object property, an object reference or a list (of object references) Notes You don't need to use get when you
  • Adobe 26001360 | Scripting Guide - Page 263
    Adobe Illustrator CS Scripting Guide 263 tell application "Illustrator CS" set textString to contents of text frame 1 of document 1 set textRef to text of text frame 1 of document 1 as reference end tell get identity
  • Adobe 26001360 | Scripting Guide - Page 264
    Table 4.130 get rotation matrix - Parameters Parameters What it is Objects supported [angle real] The rotation angle in degrees; default: 0.0 • . Example 93.1 -- Get a 30-degree rotation matrix tell application "Illustrator CS" set rotateMatrix to get rotation matrix angle 30.0 end tell get
  • Adobe 26001360 | Scripting Guide - Page 265
    Adobe Illustrator CS Scripting Guide 265 Example 94.1 -- This script gets a scale matrix tell application "Illustrator CS" set scaleMatrix to script gets a translation matrix tell application "Illustrator CS" set translateMatrix to get translation matrix delta x 10.0 delta y 100.0 end tell import
  • Adobe 26001360 | Scripting Guide - Page 266
    266 Parameters What it is from file specification File to import from Objects supported AppleScript Reference Returns import paragraph styles Load the paragraph styles from the Illustrator file. Parameters What it is document from file specification The document object or objects to be
  • Adobe 26001360 | Scripting Guide - Page 267
    Adobe Illustrator CS Scripting Guide 267 import PDF preset Loads all PDF presets from a file. Table 4.133 import PDF preset - Parameters Parameters What it is Objects supported document from file specification [replacing preset boolean] The document object or objects to be operated upon
  • Adobe 26001360 | Scripting Guide - Page 268
    . Table 4.136 invert matrix - Parameters Parameters What it is Objects supported matrix The matrix to invert • matrix Returns matrix Notes If a the inverse matrix scales the object 200% vertically tell application "Illustrator CS" set transformMatrix to get scale matrix vertical scale 50.0
  • Adobe 26001360 | Scripting Guide - Page 269
    Adobe Illustrator CS Scripting Guide 269 make Creates a new object and returns a reference to newly created object. Table 4.137 make - Parameters Parameters What it is Objects supported new type class at location reference [with properties record] [with data anything] The class of object to
  • Adobe 26001360 | Scripting Guide - Page 270
    Table 4.138 move - Parameters Parameters What it is Objects supported object reference or list (of object references) to location reference moves all objects in a document to the first layer tell application "Illustrator CS" set allPageItems to every page item of document 1 move allPageItems
  • Adobe 26001360 | Scripting Guide - Page 271
    Adobe Illustrator CS Scripting Guide 271 open Opens one or more specified documents. Table 4.139 open - Parameters Parameters What it is Objects supported anything [forcing RGB/ CMYK] with options anything The file to be opened Opens the document(s) using the specified color space,
  • Adobe 26001360 | Scripting Guide - Page 272
    document. Table 4.140 paste - Parameters Parameters What it is none Objects supported • compound path item • group item • mesh item • path item copy, and paste) require that Illustrator be the frontmost application. Use activate to bring Illustrator to the front before executing the paste
  • Adobe 26001360 | Scripting Guide - Page 273
    Adobe Illustrator CS Scripting Guide 273 print Print one or more documents or files. Table 4.141 print - Parameters Parameters What it is Objects supported anything options print options Document, file or list of documents and/or files to be printed The print options object • document •
  • Adobe 26001360 | Scripting Guide - Page 274
    set the clipboard to {} close every document saving no quit end tell AppleScript Reference redraw Forces Illustrator to redraw its window(s). Table 4.143 redraw Parameters What it is none Objects supported • application Returns nothing Example 103.1 -- This script redraws all windows in
  • Adobe 26001360 | Scripting Guide - Page 275
    Adobe Illustrator CS Scripting Guide 275 rotate Rotates one or more page items by a specified rotation angle. Table 4.144 rotate - Parameters Parameters What it is Objects supported page item angle real [transforming objects boolean] [transforming fill patterns boolean] [transforming fill
  • Adobe 26001360 | Scripting Guide - Page 276
    document. Returns a reference to the saved document. Table 4.145 save - Parameters Parameters What it is Objects supported document [in file specification] [as Illustrator/ eps/pdf] [with options anything] The document to save The file to save the document into, specified as a string
  • Adobe 26001360 | Scripting Guide - Page 277
    Adobe Illustrator CS Scripting Guide 277 Example 105.1 This example shows to batch process folders of Illustrator documents, saving each as a PDF file with specific settings. -- Processes all files in folders dropped on this script -- (when saved as an applet) and save each Illustrator file as a
  • Adobe 26001360 | Scripting Guide - Page 278
    to name of aFile set newFilePath to destinationPath & fileName & ".pdf" tell application "Illustrator CS" open aFile save current document in file newFilePath as pdf ¬ with options {class:PDF save options ¬ , compatibility:Acrobat 5 ¬ , preserve editability:true} close current document saving no end
  • Adobe 26001360 | Scripting Guide - Page 279
    Adobe Illustrator CS Scripting Guide 279 scale Scales one or more page items by the specified horizontal and vertical amounts. Table 4.146 scale - Parameters Parameters What it is Objects supported page item The page item object(s) you want to scale horizontal scale The horizontal scaling
  • Adobe 26001360 | Scripting Guide - Page 280
    the page item(s) to which the scaling is applied Objects supported Returns Notes The scale command provides many variations when used in a page item by 50% horizontally resizing to the right tell application "Illustrator CS" tell document 1 scale page item 1 horizontal scale 50.0 vertical scale
  • Adobe 26001360 | Scripting Guide - Page 281
    Adobe Illustrator CS Scripting Guide 281 set Changes a variable's value or an object's data or property. This is a standard AppleScript command used to assign values to variables and object properties. Table 4.148 set - Parameters Parameters What it is Objects supported Returns property/
  • Adobe 26001360 | Scripting Guide - Page 282
    matrix and then -- test to see if it can be inverted (if not singular) -- If it can, then it inverts it tell application "Illustrator CS" set someMatrix to get identity matrix if (not singular matrix someMatrix) then ¬ set someMatrix to invert matrix someMatrix end tell AppleScript Reference 12
  • Adobe 26001360 | Scripting Guide - Page 283
    Adobe Illustrator CS Scripting Guide 283 transform Transform one or more page items by a specified matrix. Table 4.151 transform - Parameters Parameters What it is Objects supported page item using matrix [transforming objects boolean] [transforming fill patterns boolean] [transforming fill
  • Adobe 26001360 | Scripting Guide - Page 284
    generating a rotation matrix and setting the appropriate matrix values tell application "Illustrator CS" set baseMatrix to get rotation matrix angle 45.0 set mvalue_b Table 4.152 translate - Parameters Parameters What it is Objects supported page item [delta x real] [delta y real] [transforming
  • Adobe 26001360 | Scripting Guide - Page 285
    Adobe Illustrator CS Scripting Guide 10.0 end tell translate placeholder text Translate the placeholder text to regular text; a method to enter unicode points in hex values. Parameters Unicode text What it is The placeholder text to be translated; Result: Unicode text - null Objects supported
  • Adobe 26001360 | Scripting Guide - Page 286
    286 AppleScript Reference 12 Aug 03
  • Adobe 26001360 | Scripting Guide - Page 287
    . Error checking code, for example, is brief in most of the examples-the point is to show you how to address and work with the Illustrator objects. Many of the examples may be combined to make scripts with greater functionality. Each script contains a single subroutine that can be pasted into any
  • Adobe 26001360 | Scripting Guide - Page 288
    was launched as an invisible application you have to manually activate the application to make it visible. Dim appRef As Illustrator.Application Set appRef = CreateObject("Illustrator.Application") Note: If you have both Illustrator 10 and Illustrator CS installed on the same machine and wish to
  • Adobe 26001360 | Scripting Guide - Page 289
    Adobe Illustrator CS Scripting Guide 289 There are a number of objects in addition to Application that cannot Syntax differences between Sub and Function methods Visual Basic supports different types of methods. When scripting Illustrator, your scripts will call both Sub and Function methods
  • Adobe 26001360 | Scripting Guide - Page 290
    of unused memory (in bytes) within the Adobe Illustrator partition R/O String The application's name (not related to the filename of the application file) R/O String The file path to the application R/O Variant The list of PDF
  • Adobe 26001360 | Scripting Guide - Page 291
    Adobe Illustrator CS Scripting Guide 291 Table 5.1 Application - Properties (Continued) Property R/O Value type What dialogs during the running of a script R/O String The version of the Adobe Illustrator application R/O Boolean If true, the application is visible Table 5.2 Application -
  • Adobe 26001360 | Scripting Guide - Page 292
    save the data for other applications. Avoid the possibility of this dialog by manually emptying the clipboard with the VB method Clipboard.Clear. Allow Illustrator to redraw all its windows Member of Illustrator.Application. Translate the placeholder text to regular text. A method to enter unicode
  • Adobe 26001360 | Scripting Guide - Page 293
    Adobe Illustrator CS Scripting Guide 293 Notes To open a document and obtain a reference to the document that was opened use this code: ' Open a document and get the reference to it Dim appRef as New Illustrator.Application Dim docRef as Illustrator.Document Set docRef = appRef.Open("C:\temp\
  • Adobe 26001360 | Scripting Guide - Page 294
    This script demonstrates how to create a new document with a specific color space and dimensions. Dim appRef As New Illustrator.Application Dim newDocument As Illustrator.Document If appRef.Documents.Count > 0 Then If Not IsEmpty(appRef.ActiveDocument.selection) Then appRef.ActiveDocument.Copy Set
  • Adobe 26001360 | Scripting Guide - Page 295
    Adobe Illustrator CS Scripting Guide 295 Brush A brush in an Illustrator document. Brushes are contained in documents. Table 5.3 Brush - Properties Property R/O Value type What it is Application Name Parent R/O Application object The Illustrator Application object String The Brush name
  • Adobe 26001360 | Scripting Guide - Page 296
    or index Example 3.1 This script displays the total number of available brushes in the current document. Dim appRef As New Illustrator.Application Dim numBrushes As Long If appRef.Documents.Count > 0 Then numBrushes = appRef.ActiveDocument.Brushes.Count MsgBox ("There are " & numBrushes & " brushes
  • Adobe 26001360 | Scripting Guide - Page 297
    Adobe Illustrator CS Scripting Guide 297 CharacterAttributes Specifies the properties of a character. Table 5.7 Property AkiLeft CharacterAttributes - Properties R/O Value Type Double AkiRight Double Alignment AlternateGlyphs Application AutoLeading BaselineDirection AiStyleRunAlignmentType
  • Adobe 26001360 | Scripting Guide - Page 298
    StrokeColor StrokeWeight StylisticAlternates Swash TateChuYokoHorizontal TateChuYokoVertical Titling Tracking Tsume VerticalScale Boolean If true, the Japanese font supports italics AiAutoKernType Specifies the kerning method to be used AiLanguageType The language of the text Double The
  • Adobe 26001360 | Scripting Guide - Page 299
    Adobe Illustrator CS Scripting Guide 299 Table 5.7 CharacterAttributes - Properties (Continued) Property R/O Value Type What it is WarichiCharactersAfterBreak WariChuCharactersBeforeBreak WarichuEnabled WarichuLineGap WarichuJustification WarichuLines WarichuScale Long Long Boolean Long
  • Adobe 26001360 | Scripting Guide - Page 300
    name or index Delete every element in the collection Example 5.1 Dim appRef As New Illustrator.Application Dim numChars As Integer Dim textArt As Illustrator.TextFrame Dim textArtRange As Illustrator.TextRange If appRef.Documents.Count > 0 Then numChars = 0 For Each textArt In appRef.ActiveDocument
  • Adobe 26001360 | Scripting Guide - Page 301
    Adobe Illustrator CS Scripting Guide 301 CharacterStyle A named style that specifies character attributes. Table 5.10 CharacterStyle - Properties Property R/O Value type What it is Application CharacterAttributes Name Parent R/O Application Application to which the collection belongs R/O
  • Adobe 26001360 | Scripting Guide - Page 302
    apply it to ' each of the text frames ' Dim appRef As New Illustrator.Application Dim docRef As Illustrator.Document Dim textRef1 As Illustrator.TextFrame Dim textRef2 As Illustrator.TextFrame Dim textRef3 As Illustrator.TextFrame ' Create a new document add a 3 simple text items Set docRef = appRef
  • Adobe 26001360 | Scripting Guide - Page 303
    Adobe Illustrator CS Scripting Guide 303 Dim charStyle As Illustrator.CharacterStyle Set charStyle = docRef.CharacterStyles.Add("BigRed") ' Create a red color Dim colorRed As New Illustrator.RGBColor colorRed.Red = 255 ' Set character attributes of the new style With charStyle.CharacterAttributes
  • Adobe 26001360 | Scripting Guide - Page 304
    5.15 CompoundPathItem - Properties Property Application ArtworkKnockout BlendingMode ControlBounds Editable R/O Value type What it is R/O Application object The Illustrator Application object AiKnockoutState Is this object used to create a knockout? If so, what kind of knockout? AiBlendModes
  • Adobe 26001360 | Scripting Guide - Page 305
    Adobe Illustrator CS Scripting Guide 305 Table 5.15 CompoundPathItem - Properties (Continued) Property R/O Value type in this object The top position of the CompoundPathItem The value of the Adobe URL tag assigned to this CompoundPathItem The VisibilityVariable bound to this CompoundPathItem The
  • Adobe 26001360 | Scripting Guide - Page 306
    306 Visual Basic Reference Table 5.15 CompoundPathItem - Properties (Continued) Property R/O Value type What it is Width WrapInside WrapOffset Wrapped ZOrderPosition Double Boolean Double Boolean R/O Long The width of the CompoundPathItem, excluding stroke width, calculated from the
  • Adobe 26001360 | Scripting Guide - Page 307
    Adobe Illustrator CS Scripting Guide 307 Table 5.16 CompoundPathItem - Methods (Continued) Method Returns Rotate( Angle As Double, [changePositions As Boolean], [changeFillPatterns As Boolean], [changeFillGradients As Boolean], [changeStrokePattern As Boolean], rotateAbout
  • Adobe 26001360 | Scripting Guide - Page 308
    compound path or a group by testing the type of the Parent property with a TypeName function. Dim appRef As New Illustrator.Application Dim pathArt As Illustrator.PathItem If appRef.Documents.Count > 0 Then If appRef.ActiveDocument.PathItems.Count > 0 Then For Each pathArt In appRef.ActiveDocument
  • Adobe 26001360 | Scripting Guide - Page 309
    Adobe Illustrator CS Scripting Guide 309 'Set the gradient of the compound path newPath.Stroked = True newPath.StrokeWidth = Value type What it is Application Count Parent R/O Application object The Illustrator Application object R/O Long The number of objects in the collection R/O Document
  • Adobe 26001360 | Scripting Guide - Page 310
    Property R/O Value type What it is Application Name Parent R/O Application object The Illustrator Application object String The name of the DataSet R/O Document object The name of page 58 for more information. Note: See Example 10.1 for a sample script which uses a DataSet object. 12 Aug 03
  • Adobe 26001360 | Scripting Guide - Page 311
    Adobe Illustrator CS Scripting Guide 311 DataSets A collection of DataSets. Table 5.21 DataSets - Properties Property R/O Value type What it is Application Count Parent R/O Application object The Illustrator Application object R/O Long The number of datasets in the collection R/O
  • Adobe 26001360 | Scripting Guide - Page 312
    = docRef.DataSets.Add() ' Change data and create a 2nd dataset itemRef.Hidden = True textRef.Contents = "Text Variable, dataset 2" Dim ds2 As Illustrator.DataSet Set ds2 = docRef.DataSets.Add() ' Display datasets MsgBox "Switching to dataset 1" ds1.Display MsgBox "Switching to dataset 2" ds2.Display
  • Adobe 26001360 | Scripting Guide - Page 313
    Adobe Illustrator CS Scripting Guide 313 Table 5.23 Document - Properties (Continued) Property R/O Value type What it is Brushes R/O CharacterStyles R/O CompoundPathItems R/O CropBox CropStyle DataSets R/O DefaultFillColor DefaultFilled DefaultFillOverprint DefaultStrokeCap
  • Adobe 26001360 | Scripting Guide - Page 314
    for this document's color space The file associated with the document, which includes the complete path to the file The bounds of the illustration excluding the stroke width of any objects in the document The Gradients collection contained in the document The GraphicStyles contained in the document
  • Adobe 26001360 | Scripting Guide - Page 315
    Adobe Illustrator CS Scripting Guide 315 Table 5.23 Document - Properties (Continued) Property R/O Value type What it is MojikumiSet Name OutputResolution PageItems PageOrigin ParagraphStyles Parent Path PathItems Patterns PlacedItems PluginItems PrintTiles
  • Adobe 26001360 | Scripting Guide - Page 316
    in this document R/O Variant Array (of 4 The visible bounds of the document, of 4 Doubles to describe a including stroke width of any objects in rectangle) the illustration R/O Double The width of this document, calculated from the GeometricBounds 12 Aug 03
  • Adobe 26001360 | Scripting Guide - Page 317
    associated document must be the frontmost document Save all PDF presets to a file Export( exportFile As String, exportFormat specified file Load the character styles from the Illustrator file Load the paragraph styles from the Illustrator file Load all PDF presets from a file Load the named print
  • Adobe 26001360 | Scripting Guide - Page 318
    paste Prints the document Saves the document in it current location Saves the document in the specified file as an Illustrator, EPS, or PDF file Notes Illustrator's default document settings-those properties starting with the word"Default"-are global settings that affect the current document. Be
  • Adobe 26001360 | Scripting Guide - Page 319
    A collection of documents. Table 5.25 Documents - Properties Property R/O Value type What it is Application Count Parent R/O Application object The Illustrator Application object R/O Long The number of objects in the collection R/O Object The parent of this object Table 5.26 Documents
  • Adobe 26001360 | Scripting Guide - Page 320
    files should be included in the saved document AiOutputFlattening How should transparency be flattened enumeration for file formats older than Illustrator 9 or greater? Boolean If true, the thumbnail image of the EPS artwork should be included AiPDFOverprint Default: PreservePDFOverprint
  • Adobe 26001360 | Scripting Guide - Page 321
    Adobe Illustrator CS Scripting Guide 321 Notes EPSSaveOptions can only be supplied in conjunction amount of curve information that should be preserved; Values: 0-10, Default: 7 AiFlashExportStyle The style in which the exported data should be created in Flash; Default: Flash file. 12 Aug 03
  • Adobe 26001360 | Scripting Guide - Page 322
    AiSaveOptions Double Level of compression to use. Value range: 0-10; default: 3 If true, the Flash file should be set to loop when run; default: , the exported image should be anti-aliased; default value: true The Illustrator Application object If true, the exported image should be clipped to the
  • Adobe 26001360 | Scripting Guide - Page 323
    Adobe Illustrator CS Scripting Guide 323 Table 5.29 ExportOptionsGIF - Properties (Continued) Property R/O Value type What it is ColorCount ColorDither ColorReduction DitherPercent HorizontalScale InfoLossPercent Interlaced Matte MatteColor SaveAsHTML Transparency VerticalScale WebSnap
  • Adobe 26001360 | Scripting Guide - Page 324
    Optimization R/O Value type What it is Boolean If true, the exported image should be anti-aliased; default value: true R/O Application object The Illustrator Application object Boolean If true, the exported image should be clipped to the art board Double The amount of blur to apply to the
  • Adobe 26001360 | Scripting Guide - Page 325
    Adobe Illustrator CS Scripting Guide 325 Table 5.30 ExportOptionsJPEG - Properties (Continued) Property R/O Value type What it is QualitySetting SaveAsHTML VerticalScale Long Boolean Double The quality of the exported image; value
  • Adobe 26001360 | Scripting Guide - Page 326
    Boolean If true, the exported image should be anti-aliased; default value: true R/O Application object The Illustrator Application object AiPhotoshopCompatibility Specifies which Photoshop file format to create; default: Photoshop8 Boolean If true, text objects should be exported as editable
  • Adobe 26001360 | Scripting Guide - Page 327
    Adobe Illustrator CS Scripting Guide 327 Example 16.1 This example exports the current document as a Photoshop 5 file with layers. Dim appRef As New Illustrator.Application Dim psdExportOptions As New Illustrator.ExportOptionsPhotoshop Dim docRef As Illustrator.Document If appRef.Documents.Count
  • Adobe 26001360 | Scripting Guide - Page 328
    Application ArtBoardClipping ColorCount ColorDither Boolean If true, the exported image should be anti-aliased; default value: true R/O Application object The Illustrator Application object Boolean If true, the exported image should be clipped to the art board; default: false Long The number
  • Adobe 26001360 | Scripting Guide - Page 329
    Adobe Illustrator CS Scripting Guide 329 Table 5.33 ExportOptionsPNG8 - Properties (Continued) Property R/O Value type What it is ColorReduction DitherPercent HorizontalScale Interlaced Matte MatteColor SaveAsHTML Transparency VerticalScale WebSnap AiColorReductionMethod enumeration The
  • Adobe 26001360 | Scripting Guide - Page 330
    IncludeFileInfo IncludeVariablesAndData sets OptimizeForSVGViewer Application object The Illustrator Application object Boolean If true, the true, Variables and Datasets should be included; default: false Boolean If true, the Adobe namespace should be included; default: false 12 Aug 03
  • Adobe 26001360 | Scripting Guide - Page 331
    Adobe Illustrator CS Scripting Guide 331 Table 5.34 ExportOptionsSVG - Properties (Continued) Property R/O Value type What it is PreserveEditability Slices Boolean Boolean If true, preserve Illustrator editing capability when exporting the document; default: false If true, preserve slice
  • Adobe 26001360 | Scripting Guide - Page 332
    GradientStop Set frontDocument = appRef.ActiveDocument 'Create a color for both ends of the gradient Dim startColor As New Illustrator.RGBColor Dim endColor As New Illustrator.RGBColor startColor.Red = 0 startColor.Green = 100 startColor.Blue = 255 endColor.Red = 220 endColor.Green = 0 endColor.Blue
  • Adobe 26001360 | Scripting Guide - Page 333
    Adobe Illustrator CS Scripting Guide 333 'Modify the first gradient stop. Set locationSpecification = newGradient.GradientStops Value type What it is Application Count Parent R/O Application object The Illustrator Application object R/O Long The number of objects in the collection R/O
  • Adobe 26001360 | Scripting Guide - Page 334
    R/O Value type What it is Angle Application Gradient HiliteAngle Double The gradient vector angle (in degrees) R/O Application object The Illustrator Application object Gradient object Reference to the object defining the gradient Double The gradient hilite vector angle (in degrees) 12 Aug
  • Adobe 26001360 | Scripting Guide - Page 335
    Adobe Illustrator CS Scripting Guide 335 Table 5.39 GradientColor - Properties (Continued) Property R/O Value type HiliteLength Length Matrix Double Double Matrix object Origin Variant Array (of 2 Doubles) What it is The
  • Adobe 26001360 | Scripting Guide - Page 336
    Table 5.40 GradientStop - Properties Property R/O Value type What it is Application Color Midpoint Parent RampPoint R/O Application object The Illustrator Application object Color object The color linked to this gradient stop Double The distance between two GradientStops, in percentage
  • Adobe 26001360 | Scripting Guide - Page 337
    Adobe Illustrator CS Scripting Guide Table 5.42 GradientStops - Properties Property R/O Value type Parent R/O Document object 337 What it is The document that contains this gradient stops object Table 5.43 GradientStops -
  • Adobe 26001360 | Scripting Guide - Page 338
    stops position newStop.RampPoint = lastStop.RampPoint lastStop.RampPoint = lastStop.RampPoint - 10 'Create a new color to apply to the newly created gradient stop a Gray tint value of 70% Dim newStopColor As New Illustrator.GrayColor newStopColor.Gray = 70 newStop.Color = newStopColor GraphicStyle
  • Adobe 26001360 | Scripting Guide - Page 339
    Adobe Illustrator CS Scripting Guide 339 Example 24.1 This example duplicates and groups the current selection, applying the second graphic style in the document to the items in the group. Dim appRef As New Illustrator.Application Dim newGroup As Illustrator.GroupItem Dim dupItem As Object Dim
  • Adobe 26001360 | Scripting Guide - Page 340
    . Example 25.1 This script displays the total number of available graphic styles in the current document. Dim appRef As New Illustrator.Application Dim numStyles As Integer If appRef.Documents.Count > 0 Then numStyles = appRef.ActiveDocument.GraphicStyles.Count MsgBox ("There are " & numStyles
  • Adobe 26001360 | Scripting Guide - Page 341
    Adobe Illustrator CS Scripting Guide 341 Table 5.48 GraphItem - Properties (Continued) Property R/O Value type ControlBounds contained in this GraphItem The top position of the GraphItem The value of the Adobe URL tag assigned to this GraphItem The Variable bound to this GraphItem The visible
  • Adobe 26001360 | Scripting Guide - Page 342
    342 Table 5.48 GraphItem - Properties (Continued) Property R/O Value type Wrapped Boolean ZOrderPosition R/O Long Visual Basic Reference What it is If true, wrap text frame objects around this object (text frame must be above the object) The position of this GraphItem within the stacking
  • Adobe 26001360 | Scripting Guide - Page 343
    Adobe Illustrator CS Scripting Guide 343 Table 5.49 GraphItem - Methods (Continued) Method Returns What it does It is not necessary to set the type of the VisibilityVariable before binding. Illustrator automatically sets the type to AiVisibility. GraphItems cannot be created from a script,
  • Adobe 26001360 | Scripting Guide - Page 344
    a document with graph items before running this sample." Exit Sub End If ' Rotate each graph item 90 degrees Dim graphRef As Illustrator.graphItem For Each graphRef In appRef.ActiveDocument.GraphItems graphRef.Rotate 90 Next graphRef appRef.Redraw GraphItems A collection of GraphItems. Table 5.50
  • Adobe 26001360 | Scripting Guide - Page 345
    Adobe Illustrator CS Scripting Guide Table 5.51 GraphItems - Methods Method Returns RemoveAll GrayColor - Properties Property R/O Value type What it is Application Gray R/O Application object The Illustrator Application object Double The tint of the gray as a value in the range 0.0-100.0,
  • Adobe 26001360 | Scripting Guide - Page 346
    Editable GeometricBounds GraphItems GroupItems Height Hidden IsIsolated Layer Left LegacyTextItems Locked MeshItems Name Opacity PageItems R/O Application object The Illustrator Application object AiKnockoutState enumeration Is this object used to create a knockout? If so, what kind of knockout
  • Adobe 26001360 | Scripting Guide - Page 347
    Adobe Illustrator CS Scripting Guide 347 Table 5.53 GroupItem - Properties (Continued) Property R/O Value this GroupItem Double The top position of the GroupItem String The value of the Adobe URL tag assigned to this GroupItem Variable The Variable bound to this GroupItem R/O Variant
  • Adobe 26001360 | Scripting Guide - Page 348
    348 Table 5.53 GroupItem - Properties (Continued) Property R/O Value type ZOrderPosition R/O Long Visual Basic Reference What it is The position of this art object within the stacking order of the group or layer (Parent) that contains the art object Table 5.54 GroupItem - Methods Method Copy
  • Adobe 26001360 | Scripting Guide - Page 349
    Adobe Illustrator CS Scripting Guide 349 Table 5.54 GroupItem - Methods (Continued) Method Returns Rotate( Angle As Double, [changePositions As Boolean], [changeFillPatterns As Boolean], [changeFillGradients As Boolean], [changeStrokePattern As Boolean], [rotateAbout
  • Adobe 26001360 | Scripting Guide - Page 350
    .GroupItems.Add 'Create a triangle and add text. All new art are created inside a group Dim trianglePath As Illustrator.PathItem Dim captionText As Illustrator.TextFrame Set trianglePath = triangleGroup.PathItems.Add trianglePath.SetEntirePath Array(Array(100, 100), Array(300, 100), _ Array(200
  • Adobe 26001360 | Scripting Guide - Page 351
    Adobe Illustrator CS Scripting Guide 351 Table 5.56 GroupItems - Methods Method Returns Item( compressed; default: true (version 10 or later) Boolean If true, all fonts used in the document should be embedded in the saved document (only valid for Illustrator 10, or greater, file format)
  • Adobe 26001360 | Scripting Guide - Page 352
    when less than this percentage of characters is used in the document (valid for Illustrator 9 or newer file format) Default: PreservePDFOverprint If true, save as a PDF compatible file (version 10 or later) ( default: true ) Notes IllustratorSaveOptions can only be supplied in conjunction with the
  • Adobe 26001360 | Scripting Guide - Page 353
    Adobe Illustrator CS Scripting Guide 353 Ink Provides information about the ink name and display a string of the inks in ' this document ' Dim appRef As New Illustrator.Application Dim docRef As Illustrator.Document ' create a new document and simple text frame Set docRef = appRef.Documents
  • Adobe 26001360 | Scripting Guide - Page 354
    354 InkInfo Specifies ink properties. Visual Basic Reference Table 5.59 InkInfo - Properties Property Angle Application CustomColor Density DotShape Frequency Kind PrintingStatus Trapping TrappingOrder R/O Value type What it is Double The ink's screen angle (in degrees) R/O Application
  • Adobe 26001360 | Scripting Guide - Page 355
    Adobe Illustrator CS Scripting Guide 355 InsertionPoint A location between characters, used to insert new text objects. Table 5.60 InsertionPoint - Properties Property R/O Value type Application Characters Lines Paragraphs Parent Story TextRanges
  • Adobe 26001360 | Scripting Guide - Page 356
    letters." Dim i As Integer i = 2 Do While (i < textRef.InsertionPoints.Count) textRef.InsertionPoints(i).Characters.Add (" ") i = i + 2 Loop Layer A layer in an Illustrator document. Layers may contain nested layers, which are called sublayers in the user interface. Table 5.63 Layer - Properties
  • Adobe 26001360 | Scripting Guide - Page 357
    Adobe Illustrator CS Scripting Guide 357 Table 5.63 Layer - Properties (Continued) Property R/O Value type What it is GraphItems GroupItems HasSelectedArtwork IsIsolated Layers LegacyTextItems Locked MeshItems Name Opacity PageItems Parent PathItems
  • Adobe 26001360 | Scripting Guide - Page 358
    contained by the document. The Move method does not change the position of the object on the art board, it changes the order in which Illustrator draws the objects, and the containment hierarchy. It also places the object in the specified container, behind all other such objects. Example 33.1 Dim
  • Adobe 26001360 | Scripting Guide - Page 359
    Adobe Illustrator CS Scripting Guide 359 'Get a reference to the layers, and obtain the total number Set index position of the object within the collection Deletes all objects in this collection Notes Illustrator's Layer object contains all of the PageItems in the specific layer. Your script can
  • Adobe 26001360 | Scripting Guide - Page 360
    360 Visual Basic Reference Dim appRef As New Illustrator.Application Dim targetDocument As Illustrator.Document Dim targetLayer As Illustrator.Layer Dim countOfLayers As Integer Dim layerIndex As Integer Dim layerName As String Dim searchString As String searchString = "Temporary" 'loop through
  • Adobe 26001360 | Scripting Guide - Page 361
    Adobe Illustrator CS Scripting Guide 361 Height Hidden IsIsolated Layer Left Locked Name Opacity Parent contained in this LegacyTextItem The top position of this LegacyTextItem The value of the Adobe URL tag assigned to this LegacyTextItem The Variable bound to this LegacyTextItem The visible
  • Adobe 26001360 | Scripting Guide - Page 362
    362 ZOrderPosition R/O Long Table 5.67 LegacyTextItem - Methods Method Returns ConvertToNative() Boolean Copy() Cut() Nothing Duplicate( [relativeObject As Object], [insertionLocation As AiElementPlacement]) Delete() Move( relativeObject as Object, insertionLocation as AiElementPlacement)
  • Adobe 26001360 | Scripting Guide - Page 363
    Adobe Illustrator CS Scripting Guide Table 5.67 LegacyTextItem - Methods Method Returns Rotate( Angle As Double, [changePositions As Boolean], [changeFillPatterns As Boolean], [changeFillGradients As Boolean], [changeStrokePattern As Boolean], [rotateAbout As AiTransformation])
  • Adobe 26001360 | Scripting Guide - Page 364
    364 LegacyTextItems A collection of legacy text items. Table 5.68 LegacyTextItems - Properties Property R/O Value type Application R/O Application Count Parent R/O Long R/O Object Visual Basic Reference What it is Application to which the collection belongs Number of elements in the
  • Adobe 26001360 | Scripting Guide - Page 365
    Adobe Illustrator CS Scripting Guide Table 5.71 Lines - Methods Method Index(ItemPtr As TextRange) Returns Long Item(ItemKey) TextRange RemoveAll() Nothing 365 What it does Returns the index position of
  • Adobe 26001360 | Scripting Guide - Page 366
    transformations one at a time. The following script demonstrates how to combine multiple matrices together. Dim appRef As New Illustrator.Application Dim moveMatrix As Illustrator.Matrix Dim totalMatrix As Illustrator.Matrix 'move art half an inch to the right and 1.5 inch up on the page 12 Aug 03
  • Adobe 26001360 | Scripting Guide - Page 367
    Adobe Illustrator CS Scripting Guide 367 Set moveMatrix = appRef.GetTranslationMatrix(72# * 0.5, 72# * 1.5) 'Add a rotation to the translation. We rotate 10 degrees counter clockwise Set totalMatrix = appRef.ConcatenateRotationMatrix(moveMatrix, 10) 'apply the transformation to all art in the
  • Adobe 26001360 | Scripting Guide - Page 368
    MeshItem is selected If true, this MeshItem is sliced The tags contained in this MeshItem The top position of this MeshItem The value of the Adobe URL tag assigned to this MeshItem The Variable bound to this MeshItem The visible bounds of the MeshItem including stroke width The width of the
  • Adobe 26001360 | Scripting Guide - Page 369
    Adobe Illustrator CS Scripting Guide 369 Table 5.74 MeshItem - Methods (Continued) Method Returns What it does Duplicate( [relativeObject As Object], [insertionLocation As AiElementPlacement]) Object Move( Nothing relativeObject as Object, insertionLocation
  • Adobe 26001360 | Scripting Guide - Page 370
    mesh art objects. Table 5.75 MeshItems - Properties Property R/O Value type What it is Application Count Parent R/O Application object The Illustrator Application object R/O Long The number of objects in the collection R/O object The object that contains this MeshItems object Table 5.76
  • Adobe 26001360 | Scripting Guide - Page 371
    Adobe Illustrator CS Scripting Guide 371 Notes MeshItems cannot be created from a script, but can be copied and pasted. Example 38.1 The following script illustrates how to copy MeshItems from one document to another. To run this script you need to have two open documents. One document should
  • Adobe 26001360 | Scripting Guide - Page 372
    docRef.PathItems.Rectangle(500, 200, 200, 100) Set itemRef2 = docRef.PathItems.Rectangle(550, 150, 200, 200) Dim colorRef As New Illustrator.RGBColor colorRef.Blue = 255 itemRef1.FillColor = colorRef colorRef.Red = 255 colorRef.Blue = 0 itemRef2.FillColor = colorRef appRef.Redraw ' create a nocolor
  • Adobe 26001360 | Scripting Guide - Page 373
    Adobe Illustrator CS Scripting Guide 373 OpenOptions Table 5.78 OpenOptions - Properties Property R/O for documents saved with legacy text by Illustrator versions previous to CS; default: false Example 40.1 ' OpenOptions ' ' Open a file with legacy text (AI 10 or older) ' The open options allow
  • Adobe 26001360 | Scripting Guide - Page 374
    index Deletes all objects in this collection Notes The PageItems class gives you complete access to every art object contained in an Illustrator document. Example 41.1 This example illustrates how to obtain all references to external files in the current document. The result is presented in a new
  • Adobe 26001360 | Scripting Guide - Page 375
    Adobe Illustrator CS Scripting Guide 375 Select Case TypeName(artItem) Case Is = "PlacedItem" fileReferences(index) = artItem.File index = index + 1 Case Is = "RasterItem" If (Not artItem.Embedded) Then fileReferences(index) = artItem.File index = index + 1 End If End Select If index = 10 Then
  • Adobe 26001360 | Scripting Guide - Page 376
    the first printer and display ' data on the available paper types ' Dim appRef As New Illustrator.Application Dim docRef As Illustrator.Document Dim itemRef As Illustrator.pathItem Dim textRef As Illustrator.TextFrame Dim printerRef Dim sText As String ' add a new document with some simple artwork
  • Adobe 26001360 | Scripting Guide - Page 377
    Adobe Illustrator CS Scripting Guide 377 sText = sText & vbTab & paperRef.PaperInfo.Width sText = sText & " x " & paperRef.PaperInfo.Height & vbCrLf Next paperRef textRef.Contents = sText appRef.Redraw PaperInfo Contains information about the
  • Adobe 26001360 | Scripting Guide - Page 378
    378 Visual Basic Reference Table 5.83 ParagraphAttributes - Properties (Continued) Property R/O Value type What it is DesiredGlyphScaling DesiredLetterSpacing DesiredWordSpacing EveryLineComposer FirstLineIndent HyphenateCapitalizedWords Hyphenation HyphenationPreference HyphenationZone
  • Adobe 26001360 | Scripting Guide - Page 379
    Adobe Illustrator CS Scripting Guide 379 Table 5.83 ParagraphAttributes - Properties (Continued) Property R/O Value type What it is MinimumBeforeHyphen Long MinimumGlyphScaling Double MinimumHyphenatedWordSize MinimumLetterSpacing Long Double MinimumWordSpacing Double Mojikumi String
  • Adobe 26001360 | Scripting Guide - Page 380
    of paragraphs. Table 5.84 Paragraphs - Properties Property R/O Value type What it is Application Count Parent R/O Application object The Illustrator Application object R/O Long The number of objects in the collection R/O Document object The document that contains this Paragraphs object
  • Adobe 26001360 | Scripting Guide - Page 381
    Adobe Illustrator CS Scripting Guide 381 Example 45.1 This script displays the total number of paragraphs contained in all of the TextFrameItems in the current document. Dim appRef As New Illustrator.Application Dim curTextArt As Illustrator.TextFrame Dim curTextRange As Illustrator.TextRange
  • Adobe 26001360 | Scripting Guide - Page 382
    Dim appRef As New Illustrator.Application Dim docRef As Illustrator.Document Dim pathRef As Illustrator.PathItem Dim textRef As Illustrator.TextFrame ' Create 3 .ParagraphAttributes.Justification = aiLeft paraStyle.ParagraphAttributes.FirstLineIndent = 10 Dim pg For Each pg In textRef.Paragraphs
  • Adobe 26001360 | Scripting Guide - Page 383
    Adobe Illustrator CS Scripting Guide 383 ParagraphStyles A collection of ParagraphStyle objects. Table 5.88 ParagraphStyles - Properties Property R/O Value type What it is Application Count Parent R/O Application object The Illustrator Application object R/O Long Number of elements in the
  • Adobe 26001360 | Scripting Guide - Page 384
    filled If true, the art beneath a filled object should be overprinted The bounds of the object excluding stroke width If true, this path is a guide object The height of the PathItem excluding stroke width, based on the GeometricBounds If true, this PathItem is hidden If true, this object is isolated
  • Adobe 26001360 | Scripting Guide - Page 385
    Adobe Illustrator CS Scripting Guide 385 Table 5.90 PathItem - Properties (Continued) Property R/O Value type tags contained in this PathItem The top position of this PathItem The value of the Adobe URL tag assigned to this PathItem The Variable bound to this PathItem The visible bounds of
  • Adobe 26001360 | Scripting Guide - Page 386
    386 Table 5.90 PathItem - Properties (Continued) Property R/O Value type Width Double WrapInside WrapOffset Wrapped Boolean Double Boolean ZOrderPosition R/O Long Visual Basic Reference What it is The width of the PathItem excluding stroke width, based on the GeometricBounds If true, the
  • Adobe 26001360 | Scripting Guide - Page 387
    Adobe Illustrator CS Scripting Guide 387 Table 5.91 PathItem - Methods (Continued) Method Returns What it does Resize( scaleX As Double, scaleY As Double, [changePositions As Boolean], [changeFillPatterns As Boolean], [changeFillGradients
  • Adobe 26001360 | Scripting Guide - Page 388
    of straight lines. Dim appRef As New Illustrator.Application Dim frontDocument As Illustrator.Document Dim newPath As Illustrator.PathItem Dim lineList(10) As Variant Dim index As Integer For index = 0 To 10 lineList(index) = Array(index * 10 + 50, (index - 5) ^ 2 * 5 + 50) Next Set frontDocument
  • Adobe 26001360 | Scripting Guide - Page 389
    Adobe Illustrator CS Scripting Guide 389 PathItems A collection of path art items. Table 5.92 PathItems - Properties Property R/O Value type What it is Application Count Parent R/O Application object The Illustrator Application object R/O Long The number of objects in the collection R/O
  • Adobe 26001360 | Scripting Guide - Page 390
    create a new rectangle in the first layer of the frontmost document. Dim appRef As New Illustrator.Application Dim frontDocument As Illustrator.Document Dim newRectangle As Illustrator.PathItem Set frontDocument = appRef.ActiveDocument 'create a new rectangle with 'top = 400, left side = 50, witdth
  • Adobe 26001360 | Scripting Guide - Page 391
    Adobe Illustrator CS Scripting Guide 391 PathPoint A point on a specific path. Each path point is made up when the user attempts to modify them in the user interface. Example 48.1 This script illustrates how to change the shape of a PathItem by modifying the left direction and the right direction of
  • Adobe 26001360 | Scripting Guide - Page 392
    in a specific path. Table 5.96 PathPoints - Properties Property Application Count Parent R/O Value type What it is R/O Application object The Illustrator Application object R/O Long The number of objects in the collection R/O object The object that contains this PathPoints object Table
  • Adobe 26001360 | Scripting Guide - Page 393
    Adobe Illustrator CS Scripting Guide 393 Table 5.97 PathPoints - Methods Method Illustrator.PathItem Dim newPoint As Illustrator.PathPoint Set firstPath = appRef.ActiveDocument.PathItems(1) Set newPoint = firstPath.PathPoints.Add newPoint.Anchor = Array(75, 300) newPoint.LeftDirection = Array(10
  • Adobe 26001360 | Scripting Guide - Page 394
    in a document. Table 5.100 Patterns - Properites Property Application Count Parent R/O Value type What it is R/O Application object The Illustrator Application object R/O Long The number of objects in the collection R/O Document The document that contains this Patterns object Table 5.101
  • Adobe 26001360 | Scripting Guide - Page 395
    Adobe Illustrator CS Scripting Guide 395 Example 51.1 This script illustrates how to remove a pattern. Note after removing Illustrator objects you should set the variable that referenced the object you just removed to Nothing. Dim appRef As New Illustrator.Application Dim frontDocument As
  • Adobe 26001360 | Scripting Guide - Page 396
    Illustrator.Application Dim colorOfPattern As New Illustrator.PatternColor Dim swatchRef As Illustrator.Swatch Dim swatchColor As Object Dim firstPath As Illustrator swatchColor.Pattern 'Change the pattern properties colorOfPattern.Rotation = 10 'Set the PatternColor of the original Color object
  • Adobe 26001360 | Scripting Guide - Page 397
    Adobe Illustrator CS Scripting Guide 397 PDFFileOptions Class of the PDFFileOptions property of the Preferences class. assumes the "C:\temp\Multipage.pdf" exists ' Dim appRef As New Illustrator.Application Dim docRef As Illustrator.Document appRef.UserInteractionLevel = aiDontDisplayAlerts
  • Adobe 26001360 | Scripting Guide - Page 398
    5.104 PDFSaveOptions - Properties Property R/O Value type What it is AcrobatLayers Application Boolean If true, create PDF layers from toplevel layers (Acrobat 6 only option; default: false R/O Application object Application to which the collection belongs BleedOffsetRect BleedLink ColorBars
  • Adobe 26001360 | Scripting Guide - Page 399
    Adobe Illustrator CS Scripting Guide 399 Table 5.104 PDFSaveOptions - Properties (Continued) Property R/O default: true Boolean Enable plaintext metadata 128-bit; available only for Acrobat 6; default: false PrintFlattenerOptions The printing flattener options String Transparency flattener
  • Adobe 26001360 | Scripting Guide - Page 400
    String PDF preset name String A password string to restrict editing security settings; default: no string PreserveEditability PrinterResolution RegistrationMarks RequireDocumentPassword RequirePermissionPassword TrimMarks TrimMarkWeight ViewAfterSaving Boolean If true, preserve Illustrator
  • Adobe 26001360 | Scripting Guide - Page 401
    Adobe Illustrator CS Scripting Guide 401 Notes PDF save options can only be supplied in conjunction with the SaveAs method. It is not necessary to specify values for all properties. Default values will be provided for any properties not specified. Example 54.1 This script illustrates how to
  • Adobe 26001360 | Scripting Guide - Page 402
    file containing vector-graphic data, such as a PICT, EPS or PDF file. Table 5.106 PlacedItem - Properties Property R/O Value type What ControlBounds Editable File GeometricBounds R/O Application object The Illustrator Application object AiKnockoutState enumeration Is this object used to
  • Adobe 26001360 | Scripting Guide - Page 403
    Adobe Illustrator CS Scripting Guide 403 Table 5.106 PlacedItem - Properties (Continued) Property R/O Value tags contained in this PlacedItem The top position of the PlacedItem The value of the Adobe URL tag assigned to this PlacedItem The Variable bound to this PlacedItem The visible bounds of
  • Adobe 26001360 | Scripting Guide - Page 404
    404 Visual Basic Reference Table 5.107 PlacedItem - Methods Method Copy() Returns Nothing Cut() Nothing Delete() Nothing Duplicate( [relativeObject As Object], [insertionLocation As AiElementPlacement]) Object Move( RelativeObject as Object, InsertionLocation as AiElementPlacement)
  • Adobe 26001360 | Scripting Guide - Page 405
    Adobe Illustrator CS Scripting Guide 405 Table 5.107 PlacedItem - Methods (Continued) Method Returns Translate( [deltaX vector files: EPS, PDF, SVG and embedded AI. Users can place vector art files, such as EPS and PDF files, with the File > Place... command in Illustrator. However, placed image
  • Adobe 26001360 | Scripting Guide - Page 406
    Deletes all objects in this collection Note: See Example 56.1 for sample script using PlacedItem. PluginItem An art object created by an Illustrator plug-in such as the blend tool. Table 5.110 PluginItem - Properties Property R/O Value type What it is Application ArtworkKnockout BlendingMode
  • Adobe 26001360 | Scripting Guide - Page 407
    Adobe Illustrator CS Scripting Guide 407 Table 5.110 PluginItem - Properties (Continued) Property R/O Value type ControlBounds in this PluginItem The top position of the PluginItem The value of the Adobe URL tag assigned to this PluginItem The Variable bound to this PluginItem The visible
  • Adobe 26001360 | Scripting Guide - Page 408
    408 Table 5.110 PluginItem - Properties (Continued) Property R/O Value type Wrapped Boolean ZOrderPosition R/O Long Visual Basic Reference What it is If true, wrap text frame objects around this object (text frame must be above the object) The position of this art object within the stacking
  • Adobe 26001360 | Scripting Guide - Page 409
    Adobe Illustrator CS Scripting Guide 409 Table 5.111 PluginItem - Methods (Continued) Method Returns What it does Transform( transformationMatrix As Matrix, [changePositions As Boolean], [changeFillPatterns As Boolean], [changeFillGradients As Boolean], [changeStrokePattern
  • Adobe 26001360 | Scripting Guide - Page 410
    Visual Basic Reference Table 5.112 PluginItems - Properties Property R/O Value type What it is Application Count Parent R/O Application object The Illustrator Application object R/O Long The number of objects in the collection R/O Layer object or GroupItem object The object that contains
  • Adobe 26001360 | Scripting Guide - Page 411
    Adobe Illustrator CS Scripting Guide 411 PPDFileInfo Information about the PPD file. Table 5.115 PPDFileInfo - Properties Property R/O Value type Application R/O AiApplication object File LanguageLevel ScreenList ScreenSpotFunctionList String String Variant Variant
  • Adobe 26001360 | Scripting Guide - Page 412
    Visual Basic Reference Preferences Specifies options for PDF and Photoshop files. Table 5.116 Preferences - Properties Property R/O Value type What it is Application Parent PDFFileOptions PhotoshopFileOptions R/O Application object The Illustrator Application object R/O Variant The object
  • Adobe 26001360 | Scripting Guide - Page 413
    Adobe Illustrator CS Scripting Guide 413 ' Create a PrintColorManagementOptions object and assign it ' to a PrintOptions object, then print with each color intent ' ' create a simple path item and apply a graphic style to it Dim appRef As New Illustrator.Application Dim docRef As Illustrator.
  • Adobe 26001360 | Scripting Guide - Page 414
    = 100 y = (y - (itemRef.Height + 10)) i = i + 1 Loop appRef.Redraw ' Create a separations object and assign it a ' PrintOptions object Dim printOpts As New Illustrator.printOptions Dim separationOpts As New Illustrator.PrintColorSeparationOptions printOpts.ColorSeparationOptions = separationOpts
  • Adobe 26001360 | Scripting Guide - Page 415
    Adobe Illustrator CS Scripting Guide 415 PrintCoordinateOptions This object class is a container for information about the media and associated printing parameters. Table 5.119 PrintCoordinateOptions - Properties Property R/O Value type What it
  • Adobe 26001360 | Scripting Guide - Page 416
    the item using various settings of the ' PrintCoordinateOptions object Dim coordinateOptions As New Illustrator.PrintCoordinateOptions Dim printOptions As New Illustrator.printOptions printOptions.coordinateOptions = coordinateOptions coordinateOptions.Emulsion = True ' reverse from right to left
  • Adobe 26001360 | Scripting Guide - Page 417
    Adobe Illustrator CS Scripting Guide 417 ' of each printer and display it on the page ' Dim appRef As New Illustrator.Application Dim docRef As Illustrator.Document Dim textRef As Illustrator.TextFrame Dim sData As String Set docRef = appRef.Documents.Add() Set textRef = docRef.TextFrames.Add()
  • Adobe 26001360 | Scripting Guide - Page 418
    () ' add title text frame Dim textRef1 As Illustrator.TextFrame Set textRef1 = docRef.TextFrames.Add() textRef1.Contents = "Checking Printers..." textRef1.Top = 600 textRef1.Left = 200 appRef.Redraw ' for each printer, list the PS support and InHostRip support Dim sPrintInfo As String Dim infoRef As
  • Adobe 26001360 | Scripting Guide - Page 419
    Adobe Illustrator CS Scripting Guide 419 For Each printerRef In appRef. Support = " sPrintInfo = sPrintInfo & CStr(printerRef.PrinterInfo.InRIPSeparationSupport) & vbCrLf Next printerRef textRef1.Contents = sPrintInfo appRef.Redraw PrintFlattenerOptions Flattening is used when Illustrator
  • Adobe 26001360 | Scripting Guide - Page 420
    the document with "low" and "high" ' flattener settings ' Dim appRef As New Illustrator.Application Dim docRef As Illustrator.Document Set docRef = appRef.Documents.Add() Dim itemRef As Illustrator.PathItem Set itemRef = docRef.PathItems.Rectangle(600, 200, 200, 200) docRef.GraphicStyles(2).ApplyTo
  • Adobe 26001360 | Scripting Guide - Page 421
    Adobe Illustrator CS Scripting Guide 421 PrintFontOptions This object class contains information about font downloading and substitution for the fonts used for printing the document. Table 5.123 PrintFontOptions - Properties Property R/O Value type What it is Application R/O Application
  • Adobe 26001360 | Scripting Guide - Page 422
    printJobOptions ' Dim appRef As New Illustrator.Application Dim docRef As Illustrator.Document Set docRef = appRef.Documents.Add() Dim textRef_1 As Illustrator.TextFrame Dim textRef_2 As Illustrator.TextFrame Dim textRef_3 As Illustrator.TextFrame Dim layerRef_2 As Illustrator.Layer 12 Aug 03
  • Adobe 26001360 | Scripting Guide - Page 423
    Adobe Illustrator CS Scripting Guide 423 Dim layerRef_3 As Illustrator.Layer ' create a visible, printable item Set textRef_1 = docRef.Layers(1).TextFrames.Add() textRef_1.Contents = "Visible and Printable" textRef_1.Top = 600 textRef_1.Left = 200 ' create a visible, non-
  • Adobe 26001360 | Scripting Guide - Page 424
    424 Visual Basic Reference PrintOptions PrintOptions contains information about all printing options including flattening, color management, coordinates, fonts, and paper. Table 5.125 PrintOptions - Properties Property R/O Value type What it is Application ColorManagementOptions R/O
  • Adobe 26001360 | Scripting Guide - Page 425
    Adobe Illustrator CS Scripting Guide 425 ' with the combined PrintOptions object. ' Dim appRef As New Illustrator.Application Dim docRef As Illustrator.Document Set docRef = appRef.Documents.Add() Dim symbolRef As Illustrator.Symbol Dim itemRef As Illustrator.SymbolItem Dim y As Integer dim i as
  • Adobe 26001360 | Scripting Guide - Page 426
    few attributes and ' and print with it. ' ' create a simple path item for printing Dim appRef As New Illustrator.Application Dim docRef As Illustrator.Document Dim pathItem As Illustrator.pathItem Set docRef = appRef.Documents.Add Set pathItem = docRef.PathItems.Rectangle(600, 200, 200, 200) 12 Aug
  • Adobe 26001360 | Scripting Guide - Page 427
    Adobe Illustrator CS Scripting Guide 427 docRef.GraphicStyles(2).ApplyTo pathItem ' Create a PrintCoordinateOptions object and assign it ' to a PrintOptions object Dim pageMarksOpts As New Illustrator.PrintPageMarksOptions pageMarksOpts.ColorBars = True pageMarksOpts.PageInfoMarks = True
  • Adobe 26001360 | Scripting Guide - Page 428
    and ' print with several PS levels ' ' Create a new document and add a TextFrame Dim appRef As New Illustrator.Application Dim docRef As Illustrator.Document Dim textRef As Illustrator.TextFrame Set docRef = appRef.Documents.Add() Set textRef = docRef.TextFrames.Add() textRef.Top = 600 textRef.Left
  • Adobe 26001360 | Scripting Guide - Page 429
    Adobe Illustrator CS Scripting Guide 429 Dim psOpts As New Illustrator.PrintPostScriptOptions Dim printOpts As New Illustrator.printOptions printOpts.PostScriptOptions = psOpts ' print with different PS levels psOpts.PostScriptLevel = aiPSLevel2 docRef.PrintOut printOpts psOpts.PostScriptLevel =
  • Adobe 26001360 | Scripting Guide - Page 430
    image, if the image is stored externally The tags contained in this raster art item The top position of the RasterItem The value of the Adobe URL tag assigned to this RasterItem The Variable that is bound to this RasterItem The visible bounds of the RasterItem including stroke width The width
  • Adobe 26001360 | Scripting Guide - Page 431
    Adobe Illustrator CS Scripting Guide Table 5.129 RasterItem - Properties (Continued) Property R/O Value type ZOrderPosition R/O Long 431 What it is The position of this art object within the stacking order of
  • Adobe 26001360 | Scripting Guide - Page 432
    pasting an existing RasterItem. Note that it is not necessary to set the type of the ContentVariable before binding. Example 70.1 This example illustrates how to create a new RasterItem in the frontmost document. The script assumes that you have a file called "c:\temp\sample.jpg". Dim appRef As
  • Adobe 26001360 | Scripting Guide - Page 433
    Adobe Illustrator CS Scripting Guide 433 RasterItems A collection of raster art items. Table 5.131 RasterItems - Properties Property R/O Value type What it is Application Count Parent R/O Application object The Illustrator Application object R/O Long The number of objects in the
  • Adobe 26001360 | Scripting Guide - Page 434
    to a layer or art item. Table 5.133 RGBColor - Properties Property R/O Value type What it is Application Blue Green Red R/O Application object The Illustrator Application object Double The blue color value as a value in the range 0.0-255.0 Double The green color value as a value in the
  • Adobe 26001360 | Scripting Guide - Page 435
    Adobe Illustrator CS Scripting Guide 435 Screen Screen contains all information about the screen = "Screen Objects for 1st PPD File: " & vbCrLf ' Get the first PPD Dim ppdRef As Illustrator.PPDFile Set ppdRef = appRef.PPDFileList(1) Dim sInfo As String sInfo = ppdRef.Name & vbCrLf ' Get info
  • Adobe 26001360 | Scripting Guide - Page 436
    language commands Example 74.1 ' ScreenSpotFunction ' ' Display ScreenSpot info info available for ' the first PPD ojbect ' ' Create a new document and add a TextFrame Dim appRef As New Illustrator.Application Dim docRef As Illustrator.Document 12 Aug 03
  • Adobe 26001360 | Scripting Guide - Page 437
    Adobe Illustrator CS Scripting Guide 437 Dim textRef As Illustrator.TextFrame Set docRef = appRef.Documents.Add() Set textRef = docRef.TextFrames.Add() textRef.Top = 600 textRef.Left = 50 textRef.Contents = "ScreenSpotFunctions for 1st PPD:" & vbCrLf ' Get the first PPD Dim ppdRef As Illustrator.
  • Adobe 26001360 | Scripting Guide - Page 438
    the new spot Set frontDocument = appRef.ActiveDocument Set newSpot = frontDocument.Spots.Add 'Define the new color value Dim newColor As New Illustrator.CMYKColor newColor.Cyan = 35 newColor.Magenta = 0 newColor.Yellow = 50 newColor.Black = 0 'Define a new SpotColor with an 80% tint 'of the new
  • Adobe 26001360 | Scripting Guide - Page 439
    Adobe Illustrator CS Scripting Guide 439 Spots A collection of spot colors in a document. Table 5.139 Spots - Properties Property R/O Value type What it is Application Count Parent R/O Application object The Illustrator Application object R/O Long The number of objects in the collection
  • Adobe 26001360 | Scripting Guide - Page 440
    at a specified tint value. Table 5.141 SpotColor - Properties Property R/O Value type What it is Application Spot Tint R/O Application object The Illustrator Application object Spot object A reference to the SpotColor object which defines the color Double The tint of the color as a value
  • Adobe 26001360 | Scripting Guide - Page 441
    Adobe Illustrator CS Scripting Guide 441 Dim newSpotColor As New Illustrator.SpotColor newSpotColor.Spot = newSpot newSpotColor.Tint = 50# Set frontPath = TextRange TextRanges TextSelection Words R/O Application object The Illustrator Application object R/O Characters All of the characters
  • Adobe 26001360 | Scripting Guide - Page 442
    .Redraw MsgBox "There is " & CStr(docRef.Stories.Count) & " story" ' Create a 3rd text frame and count the stories Dim textRef3 As Illustrator.TextFrame Set textRef3 = docRef.TextFrames.Add textRef3.Contents = "Each unlinked textFrame adds a story." textRef3.Top = 650 textRef3.Left = 200 appRef
  • Adobe 26001360 | Scripting Guide - Page 443
    Adobe Illustrator CS Scripting Guide 443 Table 5.144 Stories - Methods Method Returns Index(ItemPtr the object Notes The swatches correspond to the swatch palette in Illustrator's user interface. Additional swatches can be created either manually by a user or by a script. The swatch can hold
  • Adobe 26001360 | Scripting Guide - Page 444
    in a document. Table 5.147 Swatches - Properties Property Application Count Parent R/O Value type What it is R/O Application object The Illustrator Application object R/O Long The number of objects in the collection R/O Document object The document that contains this Swatches object Table
  • Adobe 26001360 | Scripting Guide - Page 445
    Adobe Illustrator CS Scripting Guide 445 Symbol A Symbol is an ArtObject that is stored in Properties Property R/O Value type What it is Application Name Parent R/O Application object The Illustrator Application object R/W String The name of the Symbol R/O Document object The document that
  • Adobe 26001360 | Scripting Guide - Page 446
    ' ' Create a simple path item from each graphic style ' and then add the item as a new symbol ' Dim appRef As New Illustrator.Application Dim docRef As Illustrator.Document Set docRef = appRef.Documents.Add() Dim y As Integer y = docRef.Height - 30 Dim iCount As Integer iCount = docRef.GraphicStyles
  • Adobe 26001360 | Scripting Guide - Page 447
    Adobe Illustrator CS Scripting Guide 447 ' create a new symbol from the graphic style docRef.Symbols.Add itemRef y = (y - (itemRef.Height + Hidden IsIsolated Layer Left Locked Name R/O Application object The Illustrator Application object AiKnockoutState enumeration Is this SymbolItem used to
  • Adobe 26001360 | Scripting Guide - Page 448
    Default: false The Symbol contained in this SymbolItem The tags contained in this SymbolItem The top position of the SymbolItem The value of the Adobe URL tag assigned to this SymbolItem The Variable bound to this SymbolItem The visible bounds of the SymbolItem including stroke width The width of
  • Adobe 26001360 | Scripting Guide - Page 449
    Adobe Illustrator CS Scripting Guide 449 Table 5.154 SymbolItem - Methods Method Copy() Cut() Delete() Duplicate( [relativeObject As Object], [insertionLocation As AiElementPlacement] ) Move( relativeObject as Object, insertionLocation as AiElementPlacement) Resize( scaleX
  • Adobe 26001360 | Scripting Guide - Page 450
    Example 82.1 ' SymbolItem ' SymbolItems ' ' Add a symbol item to the document for every ' symbol available. ' Dim appRef As New Illustrator.Application Dim docRef As Illustrator.Document Set docRef = appRef.Documents.Add() Dim x As Integer Dim y As Integer y = docRef.Height - 30 x = 50 Dim symbolRef
  • Adobe 26001360 | Scripting Guide - Page 451
    Adobe Illustrator CS Scripting Guide 451 y = y - (itemRef.Height + 20) If (y < 60) Then y = docRef.Height - 30 x = x + 200 End If i = Value type What it is Application Count Parent R/O Application object The Illustrator Application object R/O Long The number of objects in the collection R/O
  • Adobe 26001360 | Scripting Guide - Page 452
    with a specific art item. Table 5.158 Tag - Properties Property R/O Value type What it is Application Name Parent Value R/O Application object The Illustrator Application object String The Tag's name R/O object The object that contains this Tag String The data stored in this Tag Table
  • Adobe 26001360 | Scripting Guide - Page 453
    Adobe Illustrator CS Scripting Guide 453 Notes Tags allows you to assign an unlimited number of key-value pairs to any item in a document. Example 83.1 This example illustrates how to list the tags associated with the first selected item. The name and value of the tags are listed in a new
  • Adobe 26001360 | Scripting Guide - Page 454
    Returns an object reference to the object identified by itemKey; by name or index Deletes all objects in this collection Example 84.1 This example illustrates how to mark all images in a document with a specific tag. If your script creates temporary PageItems, you can then later look at the
  • Adobe 26001360 | Scripting Guide - Page 455
    Adobe Illustrator CS Scripting Guide 455 TextFont Information about a font in the document. Table and display a list of ' all available fonts. ' Dim appRef As New Illustrator.Application Dim docRef As Illustrator.Document Set docRef = appRef.Documents.Add() Dim x As Integer Dim y As Integer
  • Adobe 26001360 | Scripting Guide - Page 456
    an object reference to the object identified by itemKey; by name or index Example 86.1 Dim appRef As New Illustrator.Application Dim fontToTest As Illustrator.TextFont Dim foundTextFace As Boolean Dim fontName As String fontName = "Symbol" foundTextFace = False For Each fontToTest In appRef.Fonts
  • Adobe 26001360 | Scripting Guide - Page 457
    Adobe Illustrator CS Scripting Guide 457 TextFrame A TextFrame object contained in a Story; there may be more than one TextFrame if the text is area text. Table 5.165 TextFrame - Properties Property R/O
  • Adobe 26001360 | Scripting Guide - Page 458
    458 Visual Basic Reference Table 5.165 TextFrame - Properties (Continued) Property R/O Value type Left Lines Double R/O Lines What it is The left position of the art item All the lines in this text range Locked Name Boolean String If true, this artwork item is locked The item's name
  • Adobe 26001360 | Scripting Guide - Page 459
    Adobe Illustrator CS Scripting Guide Table 5.165 TextFrame - Properties (Continued) Property R/O Value type Top Double URL Long 459 What it is True top position of the art item True value of the Adobe URL tag assigned to this artwork item True visibility variable bound to this page item True
  • Adobe 26001360 | Scripting Guide - Page 460
    art object(s) Arranges the art relative to other art in the group or layer Example 87.1 Dim appRef As New Illustrator.Application Dim selection As Variant Dim frontDocument As Illustrator.Document Dim sourceTextArt As Illustrator.TextFrame Dim newTextArt As Illustrator.TextFrame 12 Aug 03
  • Adobe 26001360 | Scripting Guide - Page 461
    Adobe Illustrator CS Scripting Guide 461 Dim textArtGroup As Illustrator.TextFrames 'First check the selection of the application 'It has to be a text art item in order for this script to run selection = appRef.selection
  • Adobe 26001360 | Scripting Guide - Page 462
    an on-path text frame item Create a point text frame item Deletes all objects in this collection Example 88.1 The following example illustrates how to add a document and create three different types of TextFrames. ' TextFrames ' ' Add a document and create 3 TextFrames (area, path, point). ' Change
  • Adobe 26001360 | Scripting Guide - Page 463
    Adobe Illustrator CS Scripting Guide 463 Set rectRef = docRef.PathItems.Rectangle(700, 50, 100, 100) Dim areaTextRef As Illustrator.TextFrame Set areaTextRef = docRef.TextFrames.AreaText(rectRef) areaTextRef.Contents = "TextFrame #1" areaTextRef.Selected = True ' Line Text Dim lineRef As
  • Adobe 26001360 | Scripting Guide - Page 464
    Contents InsertionPoints Kerning Length Lines ParagraphAttributes Paragraphs ParagraphStyles Parent Story TextRanges TextSelection Words R/O Application object The Illustrator Application object R/O CharacterAttributes The character properties for the text range Long Offset of the first
  • Adobe 26001360 | Scripting Guide - Page 465
    Adobe Illustrator CS Scripting Guide 465 Table 5.170 TextRange - Methods (Continued) Method Returns DeSelect() Duplicate( [relativeObject As Object], [insertionLocation As ElementPlacement] ) Move( relativeObject as Object, insertionLocation as ElementPlacement) Select(AddToDocument)
  • Adobe 26001360 | Scripting Guide - Page 466
    of text range items. Table 5.171 TextRanges - Properties Property R/O Value type What it is Application Count Parent R/O Application object The Illustrator Application object R/O Long The number of objects in the collection R/O Document object The document that contains this Tags object
  • Adobe 26001360 | Scripting Guide - Page 467
    Adobe Illustrator CS Scripting Guide 467 Table 5.173 Variable - Properties (Continued) Property PageItems Parent R/O the object Note: For an example of the use of a Variable object, see Example 10.1 (for DataSets). Variables A collection of Variables in a document. Table 5.175 Variables -
  • Adobe 26001360 | Scripting Guide - Page 468
    this View AiScreenMode enumeration The mode of display for this View Double The zoom factor of this View, where 100.0 is 100% Notes Illustrator's View object represents a window view onto a document. New views cannot be created, but some properties of existing views can be modified, including
  • Adobe 26001360 | Scripting Guide - Page 469
    Adobe Illustrator CS Scripting Guide 469 Views A collection of views in a document. Table 5.178 Views - Properties Property R/O Value type What it is Application Count Parent R/O Application object The Illustrator Application object R/O Long The number of objects in the collection R/O
  • Adobe 26001360 | Scripting Guide - Page 470
    contained in all of the TextFrameItems in the current document. Dim appRef As New Illustrator.Application Dim numWords As Integer Dim textArt As Illustrator.TextFrame Dim textArtRange As Illustrator.TextRange If appRef.Documents.Count > 0 Then numWords = 0 For Each textArt In appRef.ActiveDocument
  • Adobe 26001360 | Scripting Guide - Page 471
    Adobe Illustrator CS Scripting Guide 471 Enumerations reference Enumeration type: Values: AiAlternateGlyphsForm aiDefaultForm aiTraditional aiExpert aiJIS78Form aiJIS83Form aiHalfWidth aiThirdWidth aiQuarterWidth aiFullWidth aiProportionalWidth AiAutoKernType aiNoAutoKern aiAuto
  • Adobe 26001360 | Scripting Guide - Page 472
    472 Enumeration type: AiBlendModes AiBurasagariTypeEnum AiCaseChangeType AiColor AiColorDitherMethod Values: aiColorBlend aiColorBurn aiColorDodge aiDarken aiDifference aiExclusion aiHardLight aiHue aiLighten aiLuminosity aiMultiply aiNormalBlend aiOverlay aiSaturation aiScreen aiSoftLight
  • Adobe 26001360 | Scripting Guide - Page 473
    Adobe Illustrator CS Scripting Guide Enumeration type: AiColorModel AiColorReductionMethod AiCompatibility Values: aiRegistration aiProcess aiSpot aiAdaptive aiPerceptual aiSelective aiWeb aiIllustrator3 aiJapaneseVersion3 aiIllustrator8 aiIllustrator9 aiIllustrator10 aiIllustrator11 473 What it
  • Adobe 26001360 | Scripting Guide - Page 474
    aiZIP4Bit aiZIP8Bit The quality of bitmap compression used when saving a PDF file aiAutomaticJPEGMinimum aiAutomaticJPEGLow aiAutomaticJPEGMedium aiAutomaticJPEGHigh aiAutomaticJPEGMaximum aiAutomaticJPEG2000Minimum aiAutomaticJPEG2000Low aiAutomaticJPEG2000Medium aiAutomaticJPEG2000High
  • Adobe 26001360 | Scripting Guide - Page 475
    Adobe Illustrator CS Scripting Guide Enumeration type: AiDownsampleMethod AiElementPlacement AiEPSPostScriptLevelEnum AiEPSPreview AiExportType AiFigureStyleType AiFlashExportStyle Values: aiNoDownsample aiAverageDownsample aiSubsample aiBicubicDownsample aiPlaceInside aiPlaceAtBeginning
  • Adobe 26001360 | Scripting Guide - Page 476
    aiBlackInk aiCustomInk Visual Basic Reference What it means: The type of the gradient, radial or linear The color space of a raster item or an exported Photoshop 5 file 12 Aug 03
  • Adobe 26001360 | Scripting Guide - Page 477
    Adobe Illustrator CS Scripting Guide 477 Enumeration type: AiJavaScriptExecutionMode AiJustification AiKinsokuOrderEnum AiKnockoutState Values: aiNeverShowDebugger aiDebuggerOnError aiBeforeRunning aiCenter aiLeft aiRight aiFullJustifyLastLineLeft aiFullJustifyLastLineRight
  • Adobe 26001360 | Scripting Guide - Page 478
    478 Enumeration type: AiLanguageType Values: aiEnglish aiFinnish aiStandardFrench aiCanadianFrench aiStandardGerman aiOldGerman aiSwissGerman aiItalian aiBokmalNorwegian aiNynorskNorwegian aiStandardPortuguese aiBrazillianPortuguese aiSpanish aiSwedish aiUKEnglish aiDutch aiDanish aiCatalan
  • Adobe 26001360 | Scripting Guide - Page 479
    Adobe Illustrator CS Scripting Guide Enumeration type: Values: AiMonochromeCompression aiCCIT3 aiCCIT4 aiMonoZIP aiNoMonoCompression aiRunLength AiOutputFlattening aiPreserveAppearance aiPreservePaths aiPreserveOverprints AiPageItemType AiPageMarksStyle AiPathPointSelection
  • Adobe 26001360 | Scripting Guide - Page 480
    aiTrimMarkWeight0125 aiTrimMarkWeight025 aiTrimMarkWeight05 AiPhotoshopCompatibil- aiPhotoshop5 ity aiPhotoshop8 AiPointType aiCorner aiSmooth What it means: The version of the Acrobat file format to create when saving a PDF file The type of path point, either a curve or a corner 12 Aug 03
  • Adobe 26001360 | Scripting Guide - Page 481
    Adobe Illustrator CS Scripting Guide Enumeration type: Values: AiPolarityValues aiPositive = 1 aiNegative = -1 AiPostScriptImageCompressionType aiImageCompressionNone aiImageCompressionRLE aiImageCompressionJPEG AiPrintArtworkDesignation aiVisiblePrintableLayers aiVisibleLayers
  • Adobe 26001360 | Scripting Guide - Page 482
    482 Enumeration type: AiPrintingBounds AiPrintOrientation AiPrintPosition AiPrintTiling AiRasterLinkState AiRulerUnits AiSaveOptions Values: aiArtboardBounds aiArtworkBounds aiCropBounds aiPortrait aiLandscape aiReversePortrait aiReverseLandscape aiTranslateTopLeft aiTranslateTop
  • Adobe 26001360 | Scripting Guide - Page 483
    Adobe Illustrator CS Scripting Guide 483 Enumeration type: Values: AiScreenMode aiDesktop aiFullScreen aiMultiWindow AiStrokeCap aiButtEndCap aiProjectingEndCap aiRoundEndCap AiStrokeJoin aiBevelEndJoin aiMiterEndJoin aiRoundEndJoin AiStyleRunAlignmentType aiAlignBottom aiICFBottom
  • Adobe 26001360 | Scripting Guide - Page 484
    484 Visual Basic Reference Enumeration type: AiTextOrientation AiTextType AiTransformation AiTrappingType AiUserInteractionLevel AiVariableKind Values: aiHorizontal aiVertical aiAreaText aiPathText aiPointText aiTransformBottom aiTransformBottomLeft aiTransformBottomRight aiTransformCenter
  • Adobe 26001360 | Scripting Guide - Page 485
    Adobe Illustrator CS Scripting Guide 485 Enumeration type: Values: AiWariChuJustification- aiWariChuLeft Type aiWariChuRight aiWariChuCenter aiWariChuFullJustifyLastLineLeft aiWariChuFullJustifyLastLineRight aiWariChuFullJustifyLastLineCenter aiWariChuAutoJustify AiZOrderMethod
  • Adobe 26001360 | Scripting Guide - Page 486
    486 Visual Basic Reference 12 Aug 03
  • Adobe 26001360 | Scripting Guide - Page 487
    • Scripting Support for Illustrator CS is installed with a new set of guids identifying itself and its related type library and interfaces in the Windows registry. This allows scripting in Illustrator CS to function completely independently of scripting in Illustrator 10
  • Adobe 26001360 | Scripting Guide - Page 488
    /no color assigned state an art item can be assigned. Swatch "[None]"is a preexisting example of the use of 'NoColor'. • A reference to an Illustrator.PageItem class object can no longer be directly obtained. PageItem is the abstract base class for all page/art item types. The PageItems collection
  • Adobe 26001360 | Scripting Guide - Page 489
    Adobe Illustrator 10 Scripting Guide 489 Deprecated Several features no longer appear in the type item class (PathItem for example), is now the preferred item removal method. • In Illustrator 9 and 10, item moves were accomplished using four methods implemented on the item class for which move
  • Adobe 26001360 | Scripting Guide - Page 490
    490 Changes InThe Object Model for Illustrator CS 12 Aug 03
  • Adobe 26001360 | Scripting Guide - Page 491
    "Adobe Illustrator Scripting; with Visual Basic and AppleScript," Ethan Wilde, Peachpit Press, 2003. ISBN 0-321-11251-2. (For Illustrator 10). "AppleScript for the Internet: Visual QuickStart Guide," 1st ed., Ethan Wilde, Peachpit Press, 1998. ISBN 0-201-35359-8. "AppleScript Language Guide
  • Adobe 26001360 | Scripting Guide - Page 492
    492 Internet resources Internet resources Adobe Systems, Inc. Adobe Solutions Network website: http://partners.adobe.com/asn AppleScript Apple Computer, Inc. AppleScript website www.apple.com/applescript Visual Basic Microsoft Developers Network (MSDN) scripting website msdn.microsoft.com/scripting
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238
  • 239
  • 240
  • 241
  • 242
  • 243
  • 244
  • 245
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • 252
  • 253
  • 254
  • 255
  • 256
  • 257
  • 258
  • 259
  • 260
  • 261
  • 262
  • 263
  • 264
  • 265
  • 266
  • 267
  • 268
  • 269
  • 270
  • 271
  • 272
  • 273
  • 274
  • 275
  • 276
  • 277
  • 278
  • 279
  • 280
  • 281
  • 282
  • 283
  • 284
  • 285
  • 286
  • 287
  • 288
  • 289
  • 290
  • 291
  • 292
  • 293
  • 294
  • 295
  • 296
  • 297
  • 298
  • 299
  • 300
  • 301
  • 302
  • 303
  • 304
  • 305
  • 306
  • 307
  • 308
  • 309
  • 310
  • 311
  • 312
  • 313
  • 314
  • 315
  • 316
  • 317
  • 318
  • 319
  • 320
  • 321
  • 322
  • 323
  • 324
  • 325
  • 326
  • 327
  • 328
  • 329
  • 330
  • 331
  • 332
  • 333
  • 334
  • 335
  • 336
  • 337
  • 338
  • 339
  • 340
  • 341
  • 342
  • 343
  • 344
  • 345
  • 346
  • 347
  • 348
  • 349
  • 350
  • 351
  • 352
  • 353
  • 354
  • 355
  • 356
  • 357
  • 358
  • 359
  • 360
  • 361
  • 362
  • 363
  • 364
  • 365
  • 366
  • 367
  • 368
  • 369
  • 370
  • 371
  • 372
  • 373
  • 374
  • 375
  • 376
  • 377
  • 378
  • 379
  • 380
  • 381
  • 382
  • 383
  • 384
  • 385
  • 386
  • 387
  • 388
  • 389
  • 390
  • 391
  • 392
  • 393
  • 394
  • 395
  • 396
  • 397
  • 398
  • 399
  • 400
  • 401
  • 402
  • 403
  • 404
  • 405
  • 406
  • 407
  • 408
  • 409
  • 410
  • 411
  • 412
  • 413
  • 414
  • 415
  • 416
  • 417
  • 418
  • 419
  • 420
  • 421
  • 422
  • 423
  • 424
  • 425
  • 426
  • 427
  • 428
  • 429
  • 430
  • 431
  • 432
  • 433
  • 434
  • 435
  • 436
  • 437
  • 438
  • 439
  • 440
  • 441
  • 442
  • 443
  • 444
  • 445
  • 446
  • 447
  • 448
  • 449
  • 450
  • 451
  • 452
  • 453
  • 454
  • 455
  • 456
  • 457
  • 458
  • 459
  • 460
  • 461
  • 462
  • 463
  • 464
  • 465
  • 466
  • 467
  • 468
  • 469
  • 470
  • 471
  • 472
  • 473
  • 474
  • 475
  • 476
  • 477
  • 478
  • 479
  • 480
  • 481
  • 482
  • 483
  • 484
  • 485
  • 486
  • 487
  • 488
  • 489
  • 490
  • 491
  • 492

Adobe Developer Support
345 Park Avenue
San Jose, CA 95110-2704
408-536-9000
FaxYI: 206-628-5737
Europe:
PO Box 12356
Edinburgh EH11 4GJ
United Kingdom
+44.131.458.6800
Fax: +44.131.458 6801
a
Adobe Illustrator CS
Scripting Guide
August 12, 2003