A Guide to Apple Events Scripting
A Guide to Apple Events Scripting II | Introduction 1 About this Guide 1 What You Need 1 Scripting Overview 2 Introduction to Apple Events 2 The Object Model 3 Script Writing Syntax 9 Optimizing the Performance of Scripts 9 Script Writing Sample 11 The Layout Construction Script 12 About the Script Breakdown 19 Breakdown of the Layout Construction Script 19 Definitions and Examples — Apple Events Terminology 33 Format 34 Object Reference Forms 34 Insertion Points in the Hier
TABLE OF CONTENTS Application Properties, Data Types, and Descriptions 45 Project Events and Examples 48 Project Elements and Reference Forms 48 Project Properties, Data Types, and Descriptions 49 Layout Space Events and Examples 50 Layout Space Elements and Reference Forms 50 Layout Space Properties, Data Types, and Descriptions 51 Window Events and Examples 57 Window Elements and Reference Forms 57 Window Properties, Data Types, and Descriptions 57 Selection Object Properties, Data Ty
TABLE OF CONTENTS IV | Open Type Style Record Properties, Data Types, and Descriptions 77 Menu Events and Examples 77 Menu Elements and Reference Forms 78 Menu Properties, Data Types, and Descriptions 78 Character Spec Events and Examples 78 Character Spec Elements and Reference Forms 78 Character Spec Properties, Data Types, and Descriptions 78 Color Spec Events and Examples 80 Color Spec Elements and Reference Forms 80 Color Spec Properties, Data Types, and Descriptions 80 Color Sys
TABLE OF CONTENTS Contour Properties, Data Types, and Descriptions 85 Shape Path Events and Examples 85 Shape Path Elements and Reference Forms 85 Shape Path Properties, Data Types, and Descriptions 85 Default Document Events and Examples 85 Default Document Elements and Reference Forms 86 Default Document Properties, Data Types, and Descriptions 86 Delimit Item Events and Examples 91 Delimit Item Elements and Reference Forms 91 Delimit Item Properties, Data Types, and Descriptions 92 D
TABLE OF CONTENTS VI | Graphic Cell Events and Examples 102 Graphic Cell Properties, Data Types, and Descriptions 102 Group Box Events and Examples 102 Group Box Elements and Reference Forms 103 Group Box Properties, Data Types, and Descriptions 103 H and J Spec Events and Examples 103 H and J Spec Elements and Reference Forms 104 H and J Spec Properties, Data Types, and Descriptions 104 Image Events and Examples 105 Image Elements and Reference Forms 105 Image Properties, Data Types,
TABLE OF CONTENTS Picture Box Events and Examples 122 Picture Box Elements and Reference Forms 123 Picture Box Properties, Data Types, and Descriptions 123 Picture Cell Events and Examples 126 Picture Cell Elements and Reference Forms 126 Picture Cell Properties, Data Types, and Descriptions 126 Spread Events and Examples 127 Spread Elements and Reference Forms 127 Spread Properties, Data Types, and Descriptions 128 Style Spec Events and Examples 128 Style Spec Elements and Reference Fo
TABLE OF CONTENTS Vertical Guide Events and Examples 145 Vertical Guide Elements and Reference Forms 145 Vertical Guide Properties, Data Types, and Descriptions 145 Xtension Events and Examples 146 Xtension Elements and Reference Forms 146 Xtension Properties, Data Types, and Descriptions 146 Custom Bleeds Setup Properties, Data Types, and Descriptions (Requires Custom Bleeds QuarkXTensions Software) 146 Blend Record Events and Examples 147 Blend Record Elements and Reference Forms 147 Bl
TABLE OF CONTENTS INTRODUCTION This guide provides information about Apple® events scripting with QuarkXPress®. Apple event properties that are specific to East Asian features are identified as such. ABOUT THIS GUIDE This document is for people who are ready to create scripts that communicate with QuarkXPress. If you need assistance writing or debugging scripts, consult the documentation provided with your scripting application and the scripting forums on the online services.
INTRODUCTION Script XTensions software is not required to run scripts that communicate with versions of QuarkXPress prior to QuarkXPress 5.0. A basic understanding of programming is optional. AppleScript is a relatively easy language to learn. You can begin by writing basic scripts, and add to them when your understanding of the language is more advanced.
INTRODUCTION You can do everything from simple formatting tasks to complex database publishing with scripts. For example, you might have a script that alphabetizes paragraphs or formats texts. You can also write a script to merge addresses from a database into a QuarkXPress letter template. It’s even possible to produce an entire catalog automatically by linking a QuarkXPress layout to a database of pictures and text.
ABOUT THIS GUIDE OBJECT HIERARCHY The Apple events object hierarchy is based on the simple concept of placing things inside other things. An application’s object hierarchy usually consists of objects such as windows, layouts, boxes, and contents. A specific hierarchy in QuarkXPress might include a layout that contains a page. The page contains a text box and the text box contains a story. The story contains paragraphs, and the paragraphs contain lines.
SCRIPTING OVERVIEW • Range: used to identify a range of objects (for example, text boxes three through five). • Relative Position: used to identify objects that are before or after other objects (for example, the text box before the last text box on the page). • Test: used to identify objects that meet certain conditions, (for example, the first text box with a red background).
SCRIPTING OVERVIEW INSERTION POINTS IN THE HIERARCHY An insertion point specifies where to place an object within the container hierarchy. For an example of how to use each insertion point, see the “Apple Events Terminology” portion of the “Reference Materials” section of this document. • Beginning: Used to insert or create an object at the beginning of the specified container (for example, to create a text box at the beginning of page one).
SCRIPTING OVERVIEW STANDARD SUITE • Events: The Standard Suite events are common to most applications: duplicate, close, count, make, data size, delete, exists, get, move, open, print, save, set, and quit. • Objects: The Standard Suite objects are common to most applications: application, document, file, insertion point, selection object, and window.
SCRIPTING OVERVIEW QUARKXPRESS SUITE • Events: The QuarkXPress Suite includes two events: coerce and do updates.
SCRIPTING OVERVIEW • Insertion point: The location where new text will be entered; identified by the text insertion point icon i. • Master layout: A container for master pages. The master layout allows access to master pages and master page objects. • Path: A path is a Bézier element, and can be either a shape path, clipping path, or a runaround path. • Text style range: A range of text with a single set of styles specified. Use text style range for functions such as Find/Change.
SCRIPTING OVERVIEW • Text: Editing auxiliary dictionaries and hyphenation exceptions • Pictures: Editing clipping paths • Items: Merge/split functions, box creation default settings, and anchored boxes • Color and printing: Multi-Ink colors, Hexachrome® colors, print styles, and the PPD Manager • XTensions Manager and most QuarkXTensions® software distributed by Quark Apple events are supported by some third-party XTensions software, including XData and BeyondPress.
SCRIPTING OVERVIEW PROCESS IN QUARKXPRESS Allow QuarkXPress to do calculations using its own built-in functions, and minimize context switches between QuarkXPress and the scripting application.
SCRIPTING OVERVIEW DON’T tell page 1 of layout space 1 of project 1 tell picture box 1 set rotation to 90 set color to "Cyan" set shade to 80 end tell end tell COMPILE SCRIPTS Using the do script event sends a compiled script directly to QuarkXPress where it is processed completely within the application before anything appears on-screen.
SCRIPTING OVERVIEW THE LAYOUT CONSTRUCTION SCRIPT Before reading this section, run the “Layout Construction” AppleScript script to familiarize yourself with its actions. The script and the files it requires are in the “Apple Events Scripting” folder within the “Documents” folder inside the QuarkXPress application folder.
SCRIPT WRITING SAMPLE tell default document 1 set page height to oldHeight set page width to oldWidth set automatic text box to oldAutoTextBox set guides showing to oldGuidesShowing set guides in front to oldGruidesFront set horizontal measure to xDocMeasure set vertical measure to yDocMeasure end tell tell layout space 1 of project 1 set view scale to fit page in window end tell --CREATE GUIDES TO LAYOUT ELEMENTS ON THE PAGE tell page 1 of layout space 1 of project 1 make horizontal guide at begin
SCRIPT WRITING SAMPLE set HeadlineBox to make text box at beginning with properties {bounds:{"3.875 cm", "4.962 cm", "8 cm", "18.
SCRIPT WRITING SAMPLE set story 1 to (choose file with prompt "Please select the file \"ASB Text.\"" of type {"TEXT"}) end try set size of story 1 to 11 set leading of every paragraph of story 1 to 43 set justification of every paragraph of story 1 to full set font of story 1 to "Times" end tell tell paragraph 1 of story 1 of text box 2 set drop cap characters to 1 set drop cap lines to 3 set color of character 1 of word 1 to "Blue" end tell tell last paragraph of story 1 of text box 2 set color of
SCRIPT WRITING SAMPLE set rotation to -25 try set image 1 to alias (thepath & "Shirts.TIFF") on error set image 1 to (choose file with prompt "Please select the file \"Shirts.TIFF.\"" of type {"TIFF"}) end try tell image 1 set scale to {"115", "115"} end tell end tell end tell --CREATE SECOND PICTURE BOX tell page 1 of layout space 1 of project 1 make picture box at beginning with properties {bounds: {"8.447 cm", "18.742 cm", "14.301 cm", "26.
SCRIPT WRITING SAMPLE --CREATE THIRD PICTURE BOX tell page 1 of layout space 1 of project 1 make picture box at end with properties {bounds: {"8.471 cm", "2 cm", "9.971 cm", "3.5 cm"}, color:"None"} tell picture box 3 try set image 1 to alias (thepath & "Glove.TIFF") on error set image 1 to (choose file with prompt "Please select the file \"Glove.TIFF.\"" of type {"TIFF"}) end try set bounds of image 1 to exact fit end tell duplicate picture box 3 to after picture box 3 tell picture box 4 set boun
SCRIPT WRITING SAMPLE tell line box 1 set color to "Magenta" set width to 3 set style to dotted end tell make line box at end tell line box 2 set left point to {"8 cm", "2 cm"} set right point to {"8 cm", "32 cm"} set width to 0.5 end tell end tell set guides showing of layout space 1 of project 1 to false try save project 1 in (thepath & "Constructed Layout.qxp") on error set filePath to (choose file name with prompt "Where would you like to save the file?" default name "Constructed Layout.
SCRIPT WRITING SAMPLE return end try end tell ABOUT THE SCRIPT BREAKDOWN This section first discusses how to direct a script to QuarkXPress. The script is then divided into the steps a user would perform when constructing a layout. The steps include creating a new layout, creating a text box, importing text, formatting the text, and so on. The script syntax is then displayed in the Courier font. Following the syntax is a concept line that translates the scripting language into actions in QuarkXPress.
SCRIPT WRITING SAMPLE ACTIVATE QUARKXPRESS activate CONCEPTS This statement is similar to choosing QuarkXPress from the QuarkXPress menu. Activate is a standard command used with AppleScript. ESTABLISH THE PATH set thepath to (Choose folder with prompt "Select the Sample Documents folder inside the Apple Events Scripting folder of your QuarkXPress folder:") as text CONCEPTS This statement establishes a path for sample text and image files that will be used later in the script.
SCRIPT WRITING SAMPLE SET DEFAULT SPECIFICATIONS FOR A NEW LAYOUT set page height to "30 cm" set page width to "34 cm" set automatic text box to false set guides showing to true set guides in front to true set horizontal measure to centimeters set vertical measure to centimeters end tell CONCEPTS The first three set statements are similar to setting default specifications in the New Layout dialog box. The next set statement is similar to choosing Show Guides from the View menu.
SCRIPT WRITING SAMPLE SET THE VIEW SCALE tell layout space 1 set view scale to fit page in window end tell CONCEPTS The lines above are similar to choosing Fit in Window from the View menu for the active layout. • The tell statement references the left-most layout space. • The set event changes the view scale property to the data fit page in window. The view scale property can be a percentage or specific view. For example, to specify 100% view, use 100 for the second parameter.
SCRIPT WRITING SAMPLE CREATE THE FIRST TEXT BOX tell page 1 of layout space 1 make text box at beginning with properties {bounds:{"2 cm", "5 cm", "8 cm", "19 cm"}} CONCEPTS The lines above are similar to creating a text box with the rectangular Text Box tool, and then sizing and positioning it using the Measurements palette. • The tell statement references the first page of the left-most layout space; both are referenced by index [1].
SCRIPT WRITING SAMPLE FORMAT THE HEADLINE set font to "Times" set size of word 1 to 30 set style of word 1 to all caps set base shift of word 1 to 60 set track of word 1 to 50 set kern of last character of word 1 to -100 set size of word 2 to 120 set color of word 2 to "Blue" set style of word 2 to italic set kern of character 1 of word 2 to -5 set kern of character 2 of word 2 to -5 end tell CONCEPTS The set statements above are comparable to the Font, Size, Type Style, Color, Baseline Shift, Trac
SCRIPT WRITING SAMPLE CONCEPTS The lines above are similar to creating a text box with the rectangular Text Box tool, and then sizing and positioning it using the Measurements palette. LOCATE AND IMPORT A TEXT FILE tell text box 2 try set story 1 to alias (thepath & "ASB Text") on error set story 1 to (choose file with prompt "Please select the file \"ASB Text\"" of type {"TEXT"}) end try end tell CONCEPTS The statements above are similar to locating and importing a text file in the Get Text dialog box
SCRIPT WRITING SAMPLE CONCEPTS The set statements above are comparable to choosing Font, Size, Leading, and Alignment from the Style menu. The four set events reference the entire story by index [1]. The font, size, leading, and justification properties of the story are set.
SCRIPT WRITING SAMPLE SPECIFY A RULE ABOVE set rule on of rule above to true set text length of rule above to false set width of rule above to 0.5 set position of rule above to "1 cm" set color of rule above to "Cyan" set shade of rule above to 100 end tell end tell CONCEPTS The set events above are comparable to settings in the expanded Rules tab of the Paragraph Attributes dialog box.
SCRIPT WRITING SAMPLE IMPORT THE FIRST PICTURE tell picture box 1 set rotation to -25 try set image 1 to alias (thepath & "Shirts.TIFF") on error set image 1 to (choose file with prompt "Please select the file \'Shirts.TIFF\'." of type {"TIFF"}) end try tell image 1 set scale to {115, 115} end tell end tell end tell CONCEPTS The statements above are similar to locating and importing an image file in the Get Picture dialog box (File menu).
SCRIPT WRITING SAMPLE set image 1 to alias (thepath & "Glove.TIFF") on error set image 1 to (choose file with prompt "Please select the file \"Glove.TIFF\"." of type {"TIFF"}) end try set bounds of image 1 to exact fit end tell CONCEPTS The first seven lines above are similar to creating a picture box, sizing and positioning it, and then specifying a background color as you would in the Picture tab of the Modify dialog box.
SCRIPT WRITING SAMPLE duplicate picture box 2 to after picture box 4 tell picture box 5 set bounds to {"20.471 cm", "2 cm", "21.971 cm", "3.5 cm"} end tell end tell CONCEPTS The duplicate and set events above are similar to using the Step and Repeat feature. • The first duplicate event references the second picture box by index [2]. A copy of the picture box is placed after the second picture box. • The first set statement sets numerical values for the picture box boundaries.
SCRIPT WRITING SAMPLE CONCEPTS The statements above are similar to creating a picture box and importing a picture. The properties are then specified with set events. • The tell statement references the first page of the left-most layout; both are referenced by index [1]. • The make event makes a picture box using the specified properties. • The second tell statement references the third picture box by index [3].
SCRIPT WRITING SAMPLE CONCEPTS The statements above are similar to creating and positioning a vertical line with the Orthogonal Line tool + and choosing Color, Width, and Line Style from the Style menu. • The "tell" statement references the first page of the left-most layout; both are referenced by index [1]. • The make event makes a line box with the specified settings and in the specified location, and specifies the left point and right point of the line in centimeters.
SCRIPT WRITING SAMPLE RESET DEFAULT SPECIFICATIONS FOR FUTURE LAYOUTS tell default document 1 set page height to oldHeight set page width to oldWidth set automatic text box to oldAutoTextBox set guides showing to oldGuidesShowing set guides in front to oldGuidePos set horizontal measure to xDocMeasure set vertical measure to yDocMeasure end tell end tell CONCEPTS The set statements above replace the layout default specifications with your original specifications.
SCRIPT WRITING SAMPLE FORMAT Each event is listed with a description of its usage, a prototype in AppleScript, and any applicable possible values and results. The terms and events are shown in the following format: TERM OR EVENT Usage: description of when to use this term or event.
DEFINITIONS AND EXAMPLES — APPLE EVENTS TERMINOLOGY INSERTION POINTS IN THE HIERARCHY An insertion point specifies where you want to place an object within the container hierarchy. As you create and insert objects in the hierarchy, the index reference form for existing objects may change. AFTER Usage: to insert or create an object after a specified object (the specified object will not be the container). For example, use after to move the first paragraph in a story so that it follows the seventh paragraph.
DEFINITIONS AND EXAMPLES — APPLE EVENTS TERMINOLOGY CLOSE Usage: to close a specified object and determine whether to save it. Close is usually used for a window or layout. close reference saving save options saving in alias Possible values: saving: yes, no, ask saving in: alias DUPLICATE Usage: to copy the data and properties of a specified object and create a new object with the same data and properties. You can specify an insertion point for the new object.
DEFINITIONS AND EXAMPLES — EVENTS SUPPORTED BY QUARKXPRESS DATA SIZE Usage: to obtain an object’s size in bytes. data size reference as type Possible values: as: type class Result: integer DELETE Usage: to remove a specified element from an object or application. delete reference EXISTS Usage: to check for the existence of a specified object. exists reference Result: Boolean GET Usage: to determine the data structure for an object.
DEFINITIONS AND EXAMPLES — EVENTS SUPPORTED BY QUARKXPRESS OPEN Usage: to open a specified object or file. Open reference use doc prefs remap fonts do auto picture import with reflow Possible values: use doc prefs: yes, no, ask remap fonts: no, ask do auto picture import: yes, no, ask reflow: with reflow, without reflow PRINT Usage: to print a specified object.
DEFINITIONS AND EXAMPLES — EVENTS SUPPORTED BY QUARKXPRESS EPS data: ASCII EPS, binary EPS, clean EPS transparent page: Boolean OPI: omit TIFF, omit TIFF and EPS, include images bleed: vertical measurement scale: percent version: vers 70, vers 80, vers current vers 60 JAPANESE (East Asian only) vers 60 KOREAN (East Asian only) SET/GET Usage: to change an object’s data structure. set and get are usually used to write and read an object’s internal data and properties, rather than the whole object.
DEFINITIONS AND EXAMPLES — EVENTS SUPPORTED BY QUARKXPRESS MISCELLANEOUS SUITE The Miscellaneous Suite consists of functions related to the clipboard and other menu-driven functions. COPY Usage: to place a copy of the selected object on the clipboard. copy CUT Usage: to place the selected object on the Clipboard. cut DO SCRIPT Usage: to execute a script entirely before showing the results.
DEFINITIONS AND EXAMPLES — EVENTS SUPPORTED BY QUARKXPRESS DATA COERCION CHART The following table lists the possible data structure you can request with a get as event. The € indicates that both data types can be coerced into each other. The left-facing arrow ‹ indicates that the data types on the right can be coerced into the data types on the left.
DATA COERCION CHART Items can be represented as or coerced to any of the other items that are in the same section in the chart above. For example, if the horizontal measure is set to inches, you can coerce the returned value to points by using get page width as point units. DATA COERCION USING THE APPLESCRIPT DICTIONARY Every scriptable file has an internal dictionary that defines the Apple events it can respond to, as well as the acceptable options or required parameters for those commands.
DATA COERCION CHART When one or more items are selected in the left column, their definitions display in the right column. In the window shown above, the open event in the Standard Suite is selected. The right column displays the parts of the event as well as the types of information the event expects.
DATA COERCION USING THE APPLESCRIPT DICTIONARY In practice, this means that if you want to change the color of a text box, you would write: set color of text box 1 to "green" Color is not a property of the text box class, but we can use it as such, because it has been inherited from box properties, which is inherited by generic box.
DATA COERCION USING THE APPLESCRIPT DICTIONARY APPLICATION PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O PROPERTY NAME auto backup TYPE auto lib save Boolean auto save Boolean auto save interval • • backup destination best type class color TIFF resolution colors showing convert quotes • • • current box default type doc layout showing drag and drop text | If true, auto backup is on If true, save changes to a library automatically whenever an entry is added If true, auto save is on fixed A
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • PROPERTY NAME language live scroll margin guide color maximize document bounds • • measurements showing name object reference offscreen draw opaque text box editing open document preference • pasteboard width picture import filters TYPE DESCRIPTION Simplified Chinese/ Program language Traditional Chinese/Danish/ Dutch/ International English/ US English/ French/German/ Reformed German/ Swiss German/ Italian/ Japanese/Korean/ Norwegian/Polish/ Rus
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME properties quote types ruler guide color save document position speed scroll selection show tool tips smart quotes • • style sheets showing text export filters text import filters tile to multiple monitors tools showing total backups trap information showing 46 | A GUIDE TO APPLE EVENTS SCRIPTING TYPE DESCRIPTION record Property that allows getting a list of all properties small integer Type of quotation marks to use for Smart Quote
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • PROPERTY NAME TYPE DESCRIPTION show xt manager version (integer) Version of the application never/always/ on folder change/if error/ if error or change Indicates when to show the XTensions Manager version PROJECT EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE count close project “Newsletter” close data size count of every project of application “QuarkXPress” get data size of name of project 1 as integer open make new project at beginning g
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS PROJECT PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O • • • • • PROPERTY NAME active layout space best type character spec class lock class color spec class lock default type doc format file path h and j spec class lock • • lock DESCRIPTION layout space Active layout space for this project type class Best descriptor type Boolean If true, all character specs in this project are locked type class Class descriptor type Boolean If true, all colors i
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS LAYOUT SPACE EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE data size count of every story of layout space 1 count get data size of name of layout space 1 as integer open make layout space at beginning get as make print set show get name of layout space 1 get file path of layout space 2 as string open file “Hard Drive:Test” use doc prefs yes remap fonts ask do auto picture import ask print set keep master page items of layout space 1 of project 1 to true
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS LAYOUT SPACE PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O PROPERTY NAME active layer auto constrain auto kern auto leading auto page insertion location auto picture import automatic text box 50 | reference Active layer of this layout space Boolean Boolean If true, automatically constrain limits of items within boxes If true, apply auto kerning percent Value to use for auto leading no auto page insertion/ end of story/ end of section/ end of document
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME TYPE DESCRIPTION integer Number of columns in this layout space reference Selected box current spread page Page displayed to user default spread count spread Spread displayed to user small integer Default spread count default type type class Default descriptor type file path Boolean alias percent flow version Value for custom width space fixed Layout flow version list (font record) List of fonts used in this layout column
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME hyphenation method ignore white indeterminate trap amount • index inside margin invisibles showing item spread coords keep master page items kern above knockout limit left margin ligatures on 52 | A GUIDE TO APPLE EVENTS SCRIPTING TYPE DESCRIPTION standard hyphenation/ enhanced hyphenation/ expanded hyphenation Method to use for hyphenation Boolean trap units/ overprint If true, specifies that an object color in front of multiple
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME TYPE lock guides Boolean lock low quality blends maintain leading maximum ligature track maximum view scale • • minimum view scale modified name object reference outside margin overprint limit page height page rule origin page width points per inch print setup Boolean Boolean Boolean DESCRIPTION If true, lock layout space If true, lock guides If true, display banded blends (faster) If true, the baseline of a line that falls im
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME process trap properties Q measurement right margin Roman Extra rulers showing small caps horizontal scale small caps vertical scale snap distance spread height spread rule origin spread width subscript horizontal scale subscript offset subscript vertical scale superscript horizontal scale superscript offset 54 | A GUIDE TO APPLE EVENTS SCRIPTING TYPE Boolean record Boolean DESCRIPTION If true, process trapping is on Property that al
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME superscript vertical scale superior horizontal scale superior vertical scale tool mode tool mode top margin trapping method typesetting leading mode • version TYPE DESCRIPTION percent Vertical scale for superscript characters percent Horizontal scale for superior characters percent Vertical scale for superior characters integer Index of the tool mode drag mode/ Tool that is selected contents mode rect mode/ rotate mode/ view mode
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME vertical measure view scale view scale increment TYPE DESCRIPTION inches/inches decimal/picas/ points/ millimeters/ centimeters/ ciceros/agates/ Qs (East Asian only) Vertical measurement units fit page in window/ fit spread in window/ thumbnails, or percentage Current view scale of this layout percent Percentage of change in view for each click using the Zoom tool WINDOW EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE data size close
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • • • PROPERTY NAME index modal • name object reference resizable titled zoomable zoomed If true, this window is modal plain text (string) Window name (title) reference Object reference for this object record Property that allows getting/ setting of a list of properties Boolean Boolean visible • DESCRIPTION Numbered order of this window Boolean properties • TYPE integer Boolean Boolean Boolean If true, this window is resizable If true, th
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS CHARACTER PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O • PROPERTY NAME ascent base shift • baseline • best type • • character style character type class color contents • • default type descent font • • grouped character height horizontal offset horizontal scale kern language 58 | A GUIDE TO APPLE EVENTS SCRIPTING TYPE DESCRIPTION font units Maximum ascent of any character in this text base units Baseline shift of the first character of this
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • • PROPERTY NAME TYPE DESCRIPTION reference offset Object reference for this object integer opacity Offset (character index) of the first character of this text object within the containing story percent Opacity of the first character of this text open type style record OpenType® style applied to the first character of this text record Property that allows getting a list of properties plain text (string) Rubi for this text (East Asian only)
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS LINE EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE data size count of every character of line 2 count delete data size of track of line 1 as integer get as get track of line 1 delete line 1 duplicate get duplicate line 1 to after line 3 move make line at beginning with properties {contents:“Headline”} make get justification of line 1 as string select save line 1 as “TEXT” in file “Hard Disk:TextFile” move line 1 to after line 3 save select line
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • PROPERTY NAME TYPE DESCRIPTION color type class Class descriptor type color spec Color of the first character of this text unicode text (string) Contents of this text type class Default descriptor type font units Maximum descent of any character in this text plain text (string) Name of the font of the first character in this text class contents • • default type descent font • • • grouped character height font units Height of this text
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME PinYin properties rubi sending shade size style track trap text • uniform styles vertical scale • width ZhuYin TYPE DESCRIPTION plain text (string) PinYin for this text (Simplified Chinese only) record Property that allows getting a list of properties plain text (string) Rubi for this text (Japanese and Korean only) horizontal measurement Sending for this text (East Asian only) percent Shade of the first character of this te
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS VERB APPLESCRIPT EXAMPLE make get font of paragraph 1 as string get as move make paragraph at end set select paragraph 1 move paragraph 1 to after paragraph 3 save save paragraph 3 as “TEXT” in “Hard Drive: Test.
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • PROPERTY NAME TYPE DESCRIPTION color type class The class color spec Color of the first character of this text unicode text (string) Contents of this text type class Default descriptor type font units Maximum descent of any character in this text small integer Number of drop characters small integer Number of lines the enlarged character(s) drop horizontal measurement First line indentation value plain text (string) Name of the font of
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME keep together start keep with next kern • • Boolean If true, will not separate this paragraph from next paragraph Kerning of the first character of this text small integer Language of the first character of this text leading units Vertical spacing between lines of text in this paragraph horizontal measurement Left Indent value integer Number of characters in this text object reference offset Object reference for this object inte
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME rubi rule above rule below sending shade size space after space before style style sheet tab list track trap text • uniform styles vertical scale • width ZhuYin 66 | A GUIDE TO APPLE EVENTS SCRIPTING TYPE DESCRIPTION plain text (string) Rubi for this text (Japanese and Korean only) rule record Rule above properties rule record Rule below properties horizontal measurement Sending of this text (East Asian only) percent Sha
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS STORY EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE data size count of every paragraph of story 1 count deletet data size of name of story 4 as integer save get color of story 1 as string show set font of story 1 to “Times” delete story 10 get get contents of story1 get as save story 1 as “TEXT” in “Hard Drive: Test.
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • • PROPERTY NAME character type class color contents content lock • • default type descent font format lock • • grouped character height horizontal offset horizontal scale kern • • language length name 68 | A GUIDE TO APPLE EVENTS SCRIPTING TYPE DESCRIPTION no type/ one byte/ two byte/ many types Type of the character (East Asian only) type class Class descriptor type color spec Color of the first character of this text unicode text (st
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • • PROPERTY NAME TYPE DESCRIPTION reference offset Object reference for this object integer opacity Index of the first character of this text object within the containing story percent Opacity of the first character of this text open type style record OpenType styles applied to this text plain text (string) PinYin for this text (Simplified Chinese only) record Property that allows setting of a list of properties plain text (string) Rubi for
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • PROPERTY NAME width ZhuYin TYPE DESCRIPTION horizontal Width of the first character of this text plain text (string) ZhuYin for this text (Traditional Chinese only) TEXT EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE data size data size of height of text of story 1 as integer count delete duplicate count of every word of text 1 delete text of paragraph 1 get duplicate text 1 where it is “Body Copy” to after paragraph 1 save make text at end
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS TEXT PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O • PROPERTY NAME ascent base shift • • • best type character style character type class color content • • default type descent font • • grouped character height horizontal offset horizontal scale kern • language TYPE DESCRIPTION font units Maximum ascent of any character in this text base units Baseline shift of the first character of this text type class Best descriptor type character spec Ch
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • • • PROPERTY NAME TYPE DESCRIPTION integer Number of characters in this text reference offset Object reference for this object integer opacity Offset (character index) of the first character of this text within the containing story percent Opacity of the first character of this text open type style record OpenType styles applied to this text plain text (string) PinYin for this text (Simplified Chinese only) record Property that allows sett
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • PROPERTY NAME width ZhuYin TYPE DESCRIPTION horizontal measurement Width of the first character of this text plain text (string) ZhuYin for this text (Traditional Chinese only) WORD EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE duplicate duplicate word 1 to after word 2 count data size count of every character of word 1 delete data size of font of word 1 as integer make get base shift of word “QuarkXPress” as integer get delete character
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS WORD PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O • PROPERTY NAME ascent base shift font units Maximum ascent of any character in this text base units Baseline shift of the first character of this text vertical measurement Vertical offset (from the top of the containing text box) of the baseline of the first character of this text baseline • best type type class Best descriptor type character spec class Character spec applied to this text type cla
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • PROPERTY NAME offset TYPE DESCRIPTION integer opacity Offset (character index) of the index of the first character of this text object within the containing story percent Opacity of the first character of this text open type style record OpenType styles applied to this text record Property that allows getting a list of properties plain text (string) Rubi for this text horizontal measurement Sending of this text (East Asian only) percent Sha
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS OPEN TYPE STYLE RECORD PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O PROPERTY NAME OT all small caps OT contextual alternates OT discretionary ligatures OT figure OT fractions OT ordinals OT position OT small caps OT standard ligatures OT swashes OT titling alternates TYPE Boolean Boolean Boolean tabular lining/ proportional old style/ proportional lining/tabular old style Boolean Boolean none/ superscript/ subscript/ numerator/ denominator Boolean Boolean
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS MENU ELEMENTS AND REFERENCE FORMS ELEMENT CLASS BY NUMERIC INDEX menu item • BY ID BEFORE/ AFTER BY BY SATISFYING ANOTHER NAME RANGE A TEST ELEMENT • MENU PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O PROPERTY NAME TYPE • index small integer ID of this menu integer Index of this menu international text Name of this menu • • ID name DESCRIPTION CHARACTER SPEC EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE data size data size of name of charact
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • PROPERTY NAME TYPE DESCRIPTION font type class Default descriptor type plain text (string) Name of the font of this character spec percent Hhorizontal scale of this character spec default type horizontal scale • index key character key modifier • language lock name • a list of command/ shift/option/ control Modifier keys, to use in conjunction with the key character control (may use more than one) small integer Language of this character
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS COLOR SPEC EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE delete data size of color spec “Mountain Purple” as integer get as get separation of color spec “NewCMYK” data size duplicate delete color spec “New Color” make get name of color spec 2 as string get duplicate color spec “Red” to after color spec “Blue” move make color spec at beginning move color spec “Red” to after color spec “Blue” set set name of color spec “Elizabeth” to“Mountain Purple”
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • PROPERTY NAME properties registration color • DESCRIPTION record Property that allows setting of a list of properties If true, this color is the registration color Boolean separation • TYPE short name UniqueID Boolean If true, separate into process color components plain text (string) Short-form name, if applicable small integer A unique ID good for the life of the color COLOR SYSTEM EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE get data
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS TABLE COLUMN EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE delete count every generic cell of table column 1 count delete table column 1 make make new table column at beginning TABLE COLUMN ELEMENTS AND REFERENCE FORMS ELEMENT CLASS BY NUMERIC INDEX BY ID BEFORE/ AFTER BY BY SATISFYING ANOTHER NAME RANGE A TEST ELEMENT generic cell • • • graphic cell • • • picture cell • • • text cell • • • TABLE COLUMN PROPERTIES, DATA TYPES, AND DESCR
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS TABLE ROW PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O PROPERTY NAME auto fit TYPE header Boolean DESCRIPTION If true, the auto fit property is applied to this row Boolean footer If true, this is a footer row Boolean height vertical measurement maximum height vertical measurement If true, this is a header row Row height Maximum height of the row HORIZONTAL GRIDLINE EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE count count every horizontal gridlin
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS VERTICAL GRIDLINE EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE count count every vertical gridline of table box 1 VERTICAL GRIDLINE PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O PROPERTY NAME color gap color gap opacity gap shade opacity shade style width TYPE DESCRIPTION color spec Color of this horizontal gridline color spec Gap color of this horizontal gridline perccent Gap opacity of this horizontal gridline perccent Gap shade of this horizont
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS CONTOUR ELEMENTS AND REFERENCE FORMS ELEMENT CLASS BY NUMERIC INDEX vertex BY ID BEFORE/ AFTER BY BY SATISFYING ANOTHER NAME RANGE A TEST ELEMENT • • CONTOUR PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O • • PROPERTY NAME bounds inverted TYPE DESCRIPTION measurements rectangle Bounds of this contour Boolean If true, the contour moves counter clockwise, usually indicating a hole in a shape SHAPE PATH EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE ge
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS DEFAULT DOCUMENT ELEMENTS AND REFERENCE FORMS ELEMENT CLASS BY NUMERIC BY INDEX ID BEFORE/ AFTER BY BY SATISFYING ANOTHER NAME RANGE A TEST ELEMENT character spec • • • • • color spec • • • • • fontset spec (East Asian only) • • • • • h and j spec • • • • • style spec • • • • • DEFAULT DOCUMENT PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O PROPERTY NAME TYPE auto constrain Boolean auto kern Boolean auto leading auto page ins
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • • • • PROPERTY NAME baseline grid start best type bottom margin ciceros per centimeter class column count default spread count default type facing pages type class Best descriptor type vertical measurement Height of the bottom margin of a page in this layout fixed Number of ciceros per centimeter type class The class descriptor type integer Number of columns in this layout small integer Default spread count type class Default descriptor
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME hyphenation method ignore white indeterminate trap amount • index inside margin invisibles showing item spread coords keep master page items kern above knockout limit left margin ligatures on TYPE DESCRIPTION standard hyphenation/ enhanced hyphenation/ expanded hyphenation Method of hyphenation Boolean If true, specifies that an object color in front of multiple backgrounds that include white will not take white into account when tr
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME TYPE low quality blends Boolean lock guides maintain leading maximum ligature track maximum view scale • minimum view scale object reference outside margin overprint limit page height page width points per inch process trap properties Q measurement right margin 88 | A GUIDE TO APPLE EVENTS SCRIPTING Boolean Boolean DESCRIPTION If true, lock guides If true, display banded blends (faster) If true, the baseline of a line that fall
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME Roman Extra rulers showing small caps horizontal scale TYPE DESCRIPTION percent Percent of the space between Roman and Japanese characters (East Asian only) Boolean If true, rulers are showing percent Horizontal scale value for small cap characters percent Vertical scale value for small cap characters small integer spread height Distance within which items snap to guides vertical measurement spread width Height of a spread (incl
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME typesetting leading mode vertical measure view scale view scale increment story direction TYPE Boolean DESCRIPTION If true, leading is calculated upward from the baseline of one line of text to the baseline of the line above it; if false, specifies Word Processing mode, which measures leading downward from the top of the ascent to the line below it inches/ inches decimal/ picas/points/ millimeters/ centimeters/ ciceros/agates/Qs (East Asi
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS DELIMIT ITEM PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O • PROPERTY NAME TYPE DESCRIPTION delimit integer Index of the object not word member/ can start or end word/can be contained in word/ can start or end or be contained in word Delimit type for this character index DELIMIT TABLE EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE get set delimit item “:” of delimit table 1 to can start or end word set get delimit item “:” of delimit table 1 DELIMIT T
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS FONTSET SPEC EVENTS AND EXAMPLES (EAST ASIAN ONLY) VERB FRONTIER EXAMPLE data size count every fontset spec data size of alphabet of spec 1 as string get as get phoneme of every fontset spec as string count get APPLESCRIPT EXAMPLE get pictogram of fontset spec 2 set set name of fontset spec 2 to “Head” FONTSET SPEC ELEMENTS AND REFERENCE FORMS (EAST ASIAN ONLY) None FONTSET SPEC PROPERTIES, DATA TYPES, AND DESCRIPTIONS (EAST ASIAN ONLY) R/O • • • • PR
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS GENERIC BOX EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE data size count of every word of generic box 1 count delete data size of rotation of generic box 1 as integer get as get bounds of generic box 2 duplicate delete generic box 2 move get color of frame of every generic box as string get duplicate generic box 10 to before generic box 1 set move generic box “Linda” to after last generic box set color of generic box “Sid” to “Blue” show show gen
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME box shape box type • class color content corner radius • default type end caps flipped horizontal flipped vertical frame gap color 94 | A GUIDE TO APPLE EVENTS SCRIPTING TYPE DESCRIPTION rectangular/ rounded corner/bevel corner/concave corner/ovular/ polygonal/ line shape/ orthogonal line/ spline line Shape of this box picture box type/text box type/graphic box type/line box type/xtension box type/group box type Type of this box t
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • • PROPERTY NAME TYPE DESCRIPTION gap opacity percent Shade of line gaps percent Opacity of line gaps integer layername Index of this box on its containing spread plain text Name of the layer containing this generic box gap shade index locked • name object reference opacity polygon points properties rotation runaround selected shade skew Boolean If true, this box can be moved or resized plain text (string) Name of this box reference
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME style suppress DESCRIPTION Style of the line Boolean suppress printing text outset • TYPE solid line/ sparsely dashed line/densely dashed line/ dashed line/ dotted line/ double line/thin thick line/thick thin line/thin thick thin line/ thick thin thick line/thin thin thin line width uniqueID If true, this box is suppressed at print Boolean If true, this box is suppressed at print points rectangle Space between text and the outer edg
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • • • PROPERTY NAME content index locked opacity selected shade suppress printing • uniqueID DESCRIPTION Content type of this cell integer Index of this cell in its containing table Boolean modify lock name TYPE picture content/text content/ none content If true, this cell cannot be moved or resized Boolean If true, the parameters of this cell cannot be modified plain text Name of this cell percent Opacity of this cell Boolean percent Bool
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS GRAPHIC BOX ELEMENTS AND REFERENCE FORMS ELEMENT CLASS BEFORE/ BY AFTER NUMERIC BY BY BY SATISFYING ANOTHER INDEX ID NAME RANGE A TEST ELEMENT runaround path • shape path • GRAPHIC BOX PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O • PROPERTY NAME anchored background trap • best type blend bounds box shape box type • 98 | class A GUIDE TO APPLE EVENTS SCRIPTING TYPE Boolean DESCRIPTION If true, this box is anchored in text default/ overprint/
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME TYPE DESCRIPTION content color spec Color of this box picture content/ text content/ none content Content type of this box horizontal measurement Radius of the corners of this box color corner radius • default type end caps flipped horizontal flipped vertical frame gap color gap shade • • type class Default descriptor type plain line/ left arrow/ right arrow/ left feathered arrow/right feathered arrow/ double arrow Arrowheads an
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME runaround selected shade skew style suppress printing • 100 | width uniqueID A GUIDE TO APPLE EVENTS SCRIPTING TYPE DESCRIPTION none runaround/ item runaround/ auto runaround/ manual runaround/ embedded runaround/ alpha runaround/ non white runaround/ clipping runaround/pic bounds runaround/ custom runaround Specifies control of the way text flows with respect to this box percent If true, this box is selected angle measurement An
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS GRAPHIC CELL EVENTS AND EXAMPLES VERB data size APPLESCRIPT EXAMPLE data size of content of graphic cell 1 as integer GRAPHIC CELL PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O PROPERTY NAME bounds cell type color content • • index locked • opacity rotation selected • shade uniqueID DESCRIPTION measurement rectangle Bounds of this cell picture cell type/text cell type/graphic cell type Type of this cell color spec Color of this cell picture co
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS GROUP BOX ELEMENTS AND REFERENCE FORMS ELEMENT CLASS BY NUMERIC INDEX generic box • BY ID BEFORE/ AFTER BY BY SATISFYING ANOTHER NAME RANGE A TEST ELEMENT GROUP BOX PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O PROPERTY NAME bounds constrained delete lock grouped TYPE DESCRIPTION measurements rectangle Bounds of this group box Boolean Boolean Boolean location lock Boolean lock Boolean modify lock Boolean size lock Boolean If true, this group
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS H AND J SPEC ELEMENTS AND REFERENCE FORMS None H AND J SPEC PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O • • • PROPERTY NAME auto hyphenation best type type class Best descriptor type character justification justification record Justification settings for non-space characters type class The class type class Default descriptor type horizontal measurement Controls whether the last line of text in a justified paragraph will automatically extend to the ri
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • PROPERTY NAME name object reference phonetic justification pictogram justification properties single word justify • TYPE DESCRIPTION plain text Name of this h and j specification reference Object reference for this object justification record Justification settings for phonetic characters (East Asian only) justification record Justification settings for pictogram characters (East Asian only) record Property that allows setting of a list of pr
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS IMAGE PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O • • PROPERTY NAME angle best type bounds actual bounds class color contents • • content lock default type file path format lock • DESCRIPTION angle measurement Value for rotating a picture around its center type class Best descriptor type box fit/ centered/ exact fit/ proportional fit Bounds of this picture, in relation to the bounds of the picture box fixed rectangle Bounds of this picture type
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • • • • PROPERTY NAME invert runaround missing modified modification date name object reference offset opacity properties scale screen screen angle screen frequency screen function shade show halftone 106 | A GUIDE TO APPLE EVENTS SCRIPTING TYPE Boolean Boolean Boolean DESCRIPTION If true, flow text within the runaround If true, this picture is missing from the saved location If true, this picture has been modified since it was last imported da
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME skew suppress printing TYPE DESCRIPTION angle measurement Value to slant this picture Boolean If true, this picture is suppressed at print LAYER EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE delete duplicate delete layer 3 move merge layer 1 to layer 2 copy make merge copy text box 1 to beginning of layer 2 duplicate picture box 1 of layer 3 make new layer at beginning move layer 1 to after layer 2 LAYER ELEMENTS AND REFERENCE F
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS LAYER PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O PROPERTY NAME LAYER OBJECT color keep runaround TYPE DESCRIPTION RGB color Color associated with the visual indicators for this layer Boolean locked Boolean name string suppress print Boolean visible DOCUMENT OBJECT • active layer If true, items on this layer retain their runaround settings when the layer is hidden If true, this layer is locked Name of this layer If true, the layer will not be p
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS LINE BOX PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O • PROPERTY NAME anchored background trap • best type box shape box type • class color content corner radius • default type delete lock TYPE Boolean DESCRIPTION If true, this line box is anchored in text default/ overprint/ knockout/spread auto amount/ choke auto amount Specifies amount to trap background type class Best descriptor type rectangular/ rounded corner/ bevel corner/ concave corner/
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME end caps end point flipped horizontal flipped vertical gap color gap shade • gap opacity index left point location lock locked modify lock • name object reference opacity polygon points properties right point 110 | A GUIDE TO APPLE EVENTS SCRIPTING TYPE DESCRIPTION plain line/ left arrow/ right arrow/left feathered arrow/ right feathered arrow/double arrow Arrowheads and tail feathers for this line box measurements point End p
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME rotation runaround selected shade size lock storage style TYPE DESCRIPTION angle measurement Rotation of this line box none runaround/ item runaround/ auto runaround/ manual runaround/ embedded runaround/ alpha runaround/ non white runaround/ clipping runaround/pic bounds runaround/ custom runaround Specifies control of the way text flows with respect to this line box Boolean If true, this line box is selected percent Shade of this
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME TYPE suppress printing text outset • DESCRIPTION If true, this line box is suppressed at print Boolean width uniqueID points rectangle Space between text and the outer edges of this line box thick units Thickness of this line box integer A unique ID that is good for the life of this layout MASTER LAYOUT SPACE EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE data size count of every story of master layout space 1 count get data s
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS MASTER LAYOUT SPACE PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O PROPERTY NAME active layer reference Active layer of this layout space Boolean auto kern Boolean auto page insertion location auto picture import automatic text box percent If true, automatically constrain limits of items within boxes If true, apply auto kerning Auto leading value no auto page insertion/end of story/end of section/end of document Automatic page insertion location auto i
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • • • • PROPERTY NAME TYPE DESCRIPTION current page reference Selected box current spread page Page displayed to user default spread count spread Spread displayed to user integer Default spread count default type type class Default descriptor type facing pages plain text (string) Format of this layout space current box doc format file path flex space width hyphenation method indeterminate trap amount active layer • • flow version font li
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME guides in front guides showing gutter width horizontal measure ignore white • index inside margin invisibles showing item spread coords keep master page items kern above knockout limit left margin TYPE Boolean Boolean horizontal measurement inches/ inches decimal/picas/ points/ millimeters/ centimeters/ ciceros/agates/Qs (East Asian only) Boolean DESCRIPTION If true, place guides in front of all boxes If true, guides are showing Widt
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME Boolean lock guides Boolean low quality blends maintain leading maximum ligature track maximum view scale • • • minimum view scale modified name object reference outside margin overprint limit page height page rule origin point page width points per inch 116 | TYPE ligatures on A GUIDE TO APPLE EVENTS SCRIPTING Boolean Boolean DESCRIPTION If true, combine certain characters into a single character (ligature) If true, lock guide
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME print setup process trap properties Q measurement right margin TYPE DESCRIPTION print setup record Settings used when printing this layout Boolean record Boolean If true, process trapping is on Property that allows setting of a list of properties If true, use Q for measurements (East Asian only) horizontal measurement Roman Extra Location of the right margin of a page in this layout percent rulers showing Percent of space between
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME subscript vertical scale superscript horizontal scale superscript offset superscript vertical scale superior horizontal scale superior vertical scale tool mode top margin trapping method typesetting leading mode • 118 | version vertical measure A GUIDE TO APPLE EVENTS SCRIPTING TYPE DESCRIPTION percent Vertical scale for subscript characters percent Horizontal scale for superscript characters percent Offset for superscript cha
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME view scale view scale increment vStory direction TYPE DESCRIPTION fit page in window/ fit spread in window/ thumbnails, or percentage Current view scale of this layout percent Percent of change in view for each click using the Zoom tool If true, the story is vertical (East Asian only) Boolean PAGE EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE data size count of every picture box of page 1 count delete data size of top margin of pa
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS ELEMENT CLASS BY NUMERIC INDEX BY ID layer • • line box • • picture box • text box • vertical guide • BEFORE/ AFTER BY BY SATISFYING ANOTHER NAME RANGE A TEST ELEMENT • • • • • • • • • • • • • • • • • • • PAGE PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O • • • • PROPERTY NAME TYPE DESCRIPTION bottom margin type class Best descriptor type vertical measurement Location of the bottom margin of this page measurements rectan
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • PROPERTY NAME quantity right margin top margin TYPE DESCRIPTION small integer Quantity of pages; used when creating pages horizontal measurement Location of the right margin of this page vertical measurement Location of the top margin of this page CLIPPING PATH EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE delete count of contours of shape path 1 count delete clipping path 1 get get bounds of runaround path 1 get as get bounds of shape pa
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS VERB APPLESCRIPT EXAMPLE make get runaround of picture box 1 as string show set locked of first picture box to true get as make picture box at end move move picture box 1 to after picture box “Cat” set show last picture box PICTURE BOX ELEMENTS AND REFERENCE FORMS ELEMENT CLASS BY NUMERIC INDEX image • runaround path • shape path • BY ID BEFORE/ AFTER BY BY SATISFYING ANOTHER NAME RANGE A TEST ELEMENT • • PICTURE BOX PROPERTIES, DATA TYPES,
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • PROPERTY NAME box type class color content corner radius • default type delete lock flipped horizontal flipped vertical frame gap color gap shade • gap opacity index locked location lock modify lock • name object reference TYPE DESCRIPTION picture box type/text box type/graphic box type/line box type/xtension box type/group box type Type of this box type class The class color spec Color of this box picture content/text content/none conten
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME TYPE DESCRIPTION OPI swap* percent Opacity of this box opacity polygon points properties rotation runaround selected shade size lock skew storage suppress printing 124 | A GUIDE TO APPLE EVENTS SCRIPTING Boolean If true, the picture in this box will be omitted from the PostScript stream polygon points list A list of the vertices of the polygon if picture box type is a polygon record Property that allows setting of a list of p
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • PROPERTY NAME text outset uniqueID TYPE DESCRIPTION points rectangle Space between text and the outer edges of a picture box integer A unique ID that is good for the life of this project * This property is present only when OPI XTensions software is running.
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • • PROPERTY NAME TYPE DESCRIPTION selected percent Opacity of this cell Boolean Whether this cell is selected percent Shade of this cell angle measurement Angle that this picture cell is skewed.
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS ELEMENT CLASS BY NUMERIC INDEX BY ID BEFORE/ AFTER BY BY SATISFYING ANOTHER NAME RANGE A TEST ELEMENT picture box • • • • • • text box • • • • • • vertical guide • • • • • SPREAD PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O • • • • • PROPERTY NAME TYPE DESCRIPTION class type class Best descriptor type type class The class descriptor type Boolean Used only when creating master spreads type class Default descriptor type Boolean
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS STYLE SPEC PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O • • • • PROPERTY NAME TYPE DESCRIPTION style spec best type Style spec that this style spec is based on character style type class Best descriptor type character spec class Character spec for this style spec type class The class index type class Default descriptor type integer Index of the object plain text (character) Key to invoke style spec list of command/ shift/option/ control Mo
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS TABLE BOX EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE data size count every table row of table box 1 count delete data size of bounds of table box 2 as list set get count of rows of table box 1 as string get delete table box 2 show set name of table box 1 to “Page1Table” get name of table box 1 get as show table box “Page1Table” TABLE BOX ELEMENTS AND REFERENCE FORMS ELEMENT CLASS BY NUMERIC INDEX BY ID BEFORE/ AFTER BY BY SATISFYING ANOTHER N
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME • box shape • cell type • class type • color column fit content • • • corner radius default type delete lock flipped horizontal height break • • 130 | height break index layername A GUIDE TO APPLE EVENTS SCRIPTING TYPE DESCRIPTION rectangular/ rounded corner/ bevel corner/ concave corner/ ovular/polygonal/ line shape/ orthogonal line/ spline line Shape of this table box mixed cell type/none cell type/text cell type Cell typ
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME location lock modify lock • name object reference opacity properties • rotation row fit runaround selected shade size lock • skew TYPE Boolean DESCRIPTION If true, the location of this table box is locked Boolean If true, the properties of this table box cannot be modified plain text Name of this table box reference Object reference for this object percent Opacity of this table box record A property that allows getting a lis
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • PROPERTY NAME TYPE suppress printing DESCRIPTION If true, this table box is suppressed at print Boolean unique ID integer width break width break A unique ID good for the life of this layout Boolean If true, a width restriction is applied to this table box horizontal measurement Width restriction applied to this table box TEXT BOX EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE data size count of every word of text box “HeadlineStory” count
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS ELEMENT CLASS BY NUMERIC INDEX text • text style range • word • BY ID BEFORE/ AFTER BY BY SATISFYING ANOTHER NAME RANGE A TEST ELEMENT • • • • • • • • TEXT BOX PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O PROPERTY NAME align text align with line • anchored background trap • best type blend bounds • box overflows box shape TYPE DESCRIPTION ascent align/ centered align/ baseline align/ descent align Text alignment on this text path top a
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • • PROPERTY NAME box type box wraps class color columns content corner radius • default type end caps first baseline first baseline offset flip flipped horizontal 134 | A GUIDE TO APPLE EVENTS SCRIPTING TYPE DESCRIPTION picture box type/text box type/graphic box type/line box type/xtension box type/group box type Type of this box Boolean If true, text in this box wraps to the next box type class The class color spec Color of this box small in
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME flipped vertical frame gap color gap shade gutter • index inter para max left point delete lock location lock locked modify lock name next text box • object reference opacity orientation TYPE DESCRIPTION Boolean If true, contents of this box are flipped top to bottom frame record Frame properties of this box color spec Color of line gaps percent Shade of line gaps horizontal measurement Space between columns integer Index of
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME TYPE DESCRIPTION polygon points list A list of the vertices for Shape path of this box text box (reference) Specifies previous text box in text box chain record right point Property that allows getting a list of properties measurements point rotation End-point of the line (only applicable with text paths that are not spline lines) angle measurement Rotation angle of this box polygon points previous text box properties runaround
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME style suppress printing text inset text skew unique ID vertical justification width DESCRIPTION Style of this box’s frame Boolean text angle • TYPE solid line/ sparsely dashed line/densely dashed line/ dashed line/ dotted line/ double line/thin thick line/thick thin line/thin thick thin line/ thick thin thick line/thin thin thin line If true, this box is suppressed at print angle measurement Angle of the text in this box inset units (
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS TEXT CELL ELEMENTS AND REFERENCE FORMS ELEMENT CLASS BY NUMERIC INDEX BY ID BEFORE/ AFTER BY BY SATISFYING ANOTHER NAME RANGE A TEST ELEMENT character • • • • fixed rectangle • fixed point • line • • • • paragraph • • • • story • • • • text • • • text style range • • • • word • • • • • • • TEXT CELL PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O PROPERTY NAME cell type columns content first baseline minimum first baseline
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME next text box next text cell Previous text box • • Previous text cell rows selected unique ID TYPE DESCRIPTION text box (reference) Next text box in this text box chain text cell (reference) Next text cell in this text box chain text box (reference) Previous text box in this text box chain text cell (reference) Previous text cell in this text box chain small integer Number of rows in this table Boolean integer If true, this c
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS TEXT STYLE RANGE ELEMENTS AND REFERENCE FORMS ELEMENT CLASS BY NUMERIC INDEX BY ID BEFORE/ AFTER BY BY SATISFYING ANOTHER NAME RANGE A TEST ELEMENT character • • • • line • • • • paragraph • • • • story • • • • text • • • text style range • • • • word • • • • • TEXT STYLE RANGE PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O • PROPERTY NAME ascent base shift font units Maximum ascent of any character in this text base unit
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • • PROPERTY NAME TYPE DESCRIPTION horizontal offset font units Height of this text horizontal measurement Horizontal offset (from the left side of the containing text box) of the first character of this text percent Horizontal scale of the first character of this text fixed Kerning of the first character of this text integer Number of characters in this text reference Object reference for this object integer Offset (character index) of the f
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME on styles opacity open type style properties shade size style track trap text 142 | A GUIDE TO APPLE EVENTS SCRIPTING TYPE DESCRIPTION plain/bold/ italic/ underline/ outline/ shadow/ superscript/ subscript/ superior/ strikethrough/ all caps/small caps/ word underline/ comma emphasis (East Asian only)/ dot emphasis Styles that are used for this text percent Opacity of the first character of this text open type style record OpenTyp
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O • PROPERTY NAME uniform styles vertical scale • width TYPE DESCRIPTION text style info Text styles that are uniformly applied to this text percent Vertical scale of the first character of this text horizontal measurement Width of the first character of this text VERTEX EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE delete data size of left handle of vertex 1 as integer make get right handle of vertex 3 as list data size get delete vertex 1 mo
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS VERTICAL GUIDE EVENTS AND EXAMPLES VERB data size APPLESCRIPT EXAMPLE delete data size of scale of vertical guide 1 as integer get as make get position of vertical guide 3 as integer get delete vertical guide 1 get undeletable of vertical guide 4 make vertical guide at beginning with properties {position:“36 pt”} move move vertical guide 1 to after vertical guide 3 set set position of vertical guide 1 to “6 cm” VERTICAL GUIDE ELEMENTS AND REFERENCE FO
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS XTENSION EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE get get name of xtension 1 XTENSION ELEMENTS AND REFERENCE FORMS None XTENSION PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O • • PROPERTY NAME name index • • uniqueID version TYPE DESCRIPTION plain text Name of this XTensions module integer Index of this XTensions module base class See this class for additional properties plain text ID of this XTensions module version Version of
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS BLEND RECORD EVENTS AND EXAMPLES VERB APPLESCRIPT EXAMPLE count count every blend record of layout space 1 of project 1 BLEND RECORD ELEMENTS AND REFERENCE FORMS None BLEND RECORD PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O • • • • PROPERTY NAME angle color opacity shade style TYPE DESCRIPTION small integer Angle of blend; default is zero degrees color spec Color spec of this blend record percent Opacity of this blend record percent Shade of this
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME TYPE DESCRIPTION fixed origin Left side of this fixed rectangle fixed point right Origin of this fixed rectangle (changing offsets entire rectangle) fixed Right side of this fixed rectangle fixed Top side of this fixed rectangle fixed point Top-left point of this fixed rectangle fixed Width of this fixed rectangle left top top left width FONT RECORD PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O PROPERTY NAME TYPE DESCRIPTIO
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME outside trap opacity shade style width TYPE DESCRIPTION default/ overprint/ knockout/ spread auto amount/ choke auto amount, or fixed Trap specification for outside of this frame percent Frame opacity percent Frame shade solid line/ sparsely dashed line/densely dashed line/ dashed line/ dotted line/ double line/thin thick line/thick thin line/thin thick thin line/ thick thin thick line/thin thin thin line Style of this frame thick u
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS OPI SETUP RECORD PROPERTIES, DATA TYPES, AND DESCRIPTIONS (REQUIRES OPI QUARKXTENSIONS SOFTWARE) PROPERTY NAME R/O OPI SETUP OBJECT include TIFF include EPS lowres TIFF PICTURE BOX OBJECT TYPE DESCRIPTION Boolean If true, include TIFF images in the PostScript stream Boolean Boolean OPI active Boolean OPI swap Boolean If true, include EPS images in the PostScript stream If true, send TIFF images as low resolution If true, OPI QuarkXTensions software
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME flip horizontal flip vertical full res rotated objects halftone screen include blank pages invert image orientation output setup page gap page position page sequence paper offset • paper size paper size list paper height paper width print quality print spreads 150 | A GUIDE TO APPLE EVENTS SCRIPTING TYPE Boolean Boolean Boolean fixed Boolean Boolean DESCRIPTION If true, flip output horizontally If true, flip output vertically If
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME print thumbnails printer type • TYPE Boolean DESCRIPTION If true, print thumbnails plain text (string) Selected printer type a list of plain text (strings) List of available printer types percent Scale at which to print registration marks off/centered/ off center Registration marks setting fixed Registration marks offset resolution small integer Number of dots per inch at which to print this layout printer type list reduce or
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS R/O PROPERTY NAME style text length width TYPE DESCRIPTION solid line/ sparsely dashed line/ densely dashed line/dashed line/ dotted line/ double line/thin thick line/thick thin line/thin thick thin line/ thick thin thick line/thin thin thin line Style of the rule Boolean thick units If true, indents rule by the width of the first/last line of the paragraph Width of the rule TAB RECORD PROPERTIES, DATA TYPES, AND DESCRIPTIONS R/O PROPERTY NAME align cha
REFERENCE MATERIAL FOR QUARKXPRESS OBJECTS Glossary APPLE EVENTS Messages sent from one Mac OS application or process to another that give instructions, respond to instructions, and send or receive data. Apple events are defined by Apple Inc. or other application developers and must conform to the Apple Event Interprocess Messaging Protocol. APPLE EVENT REGISTRY: STANDARD SUITES A compilation of standard Apple events defined by Apple Inc.
APPLE EVENTS — OBJECT MISCELLANEOUS SUITE REFERENCE FORM Basic Apple events, related to the clipboard and other menu-driven functions, that most applications support. The events include: cut, copy, paste, undo, and so on. A parameter that identifies the specific object in a container to which the Apple event is sent. QuarkXPress objects can be referenced by index, name, relative position, or test.
OBJECT HIERARCHY — USERTALK STANDARD SUITE The basic Apple events and objects that most applications use to communicate. The events include: get, set, create, duplicate, move, delete, count, close, save, print, open, data size, and exists. Objects include windows, documents, pages, and so on. SUITE A group of objects and events that relate to a common purpose. TABLE SUITE The Functional-area Suite that defines all objects (and their properties) related to working with tables in QuarkXPress.
LEGAL NOTICES ©2017 Quark Software Inc. and its licensors. All rights reserved. Protected by the following United States Patents: 5,541,991; 5,907,704; 6,005,560; 6,052,514; 6,081,262; 6,633,666 B2; 6,947,959 B1; 6,940,518 B2; 7,116,843; 7,463,793; and other patents pending. Quark, the Quark logo, and QuarkXPress are trademarks or registered trademarks of Quark Software Inc. and its affiliates in the U.S. and/or other countries. All other marks are the property of their respective owners.