Scripting Guide
Page 5
... Script locations and checking application installation 74 5 Working with Documents in AppleScript 75 Basic document management 76 Creating a new document 76 Opening a document...76 Closing a document...77 Saving a document ...77 Basic page layout ...78 Defining page size and document length 78 Defining bleed and slug areas 79 Setting page margins and columns 80 Changing the pasteboard's appearance 82 Using guides and grids 82 Defining guides...82 Setting...
... Script locations and checking application installation 74 5 Working with Documents in AppleScript 75 Basic document management 76 Creating a new document 76 Opening a document...76 Closing a document...77 Saving a document ...77 Basic page layout ...78 Defining page size and document length 78 Defining bleed and slug areas 79 Setting page margins and columns 80 Changing the pasteboard's appearance 82 Using guides and grids 82 Defining guides...82 Setting...
Scripting Guide
Page 6
iv Contents Adobe InDesign CS2 Scripting Guide Exporting a document as PDF 104 Using current PDF export options 104 Setting PDF export options 104 Exporting a range of pages 106 Exporting pages separately 106 Exporting pages as EPS 107 Exporting all pages ...108 Exporting a range of pages 108 Exporting with file naming 108 6 Working with Documents in JavaScript 111 Basic document management 112 Creating a new document 112 Opening a document...112 Closing a document...112 Saving a document ...113 Basic page layout ...114 Defining page size and document length...
iv Contents Adobe InDesign CS2 Scripting Guide Exporting a document as PDF 104 Using current PDF export options 104 Setting PDF export options 104 Exporting a range of pages 106 Exporting pages separately 106 Exporting pages as EPS 107 Exporting all pages ...108 Exporting a range of pages 108 Exporting with file naming 108 6 Working with Documents in JavaScript 111 Basic document management 112 Creating a new document 112 Opening a document...112 Closing a document...112 Saving a document ...113 Basic page layout ...114 Defining page size and document length...
Scripting Guide
Page 7
Adobe InDesign CS2 Scripting Guide Contents v 7 Working with Documents in VBScript 143 Basic document management 144 Creating a new document 144 Opening a document...144 Closing a document...145 Saving a document ...145 Basic page layout ...146 Defining page size and document length 146 Defining bleed and slug areas 146 Setting page margins and columns 148 Changing the pasteboard's appearance 149 Using guides and grids 150 Defining guides ...150 Setting grid preferences ...152...
Adobe InDesign CS2 Scripting Guide Contents v 7 Working with Documents in VBScript 143 Basic document management 144 Creating a new document 144 Opening a document...144 Closing a document...145 Saving a document ...145 Basic page layout ...146 Defining page size and document length 146 Defining bleed and slug areas 146 Setting page margins and columns 148 Changing the pasteboard's appearance 149 Using guides and grids 150 Defining guides ...150 Setting grid preferences ...152...
Scripting Guide
Page 11
... ExtendScript interpreter. guides.add(myDocument.layers.item("GuideLayer"), {orientation:HorizontalOrVertical.horizontal, location:marginPreferences.top, fitToPage:false}); Display the Scripts palette by double-clicking the script name in InDesign. VBScript example When you paste the following line into a text editor, remove the line breaks following "properties". To fix the script, you don't, the script generates an error. If you must remove the unnecessary line breaks. We cannot fully document AppleScript, VBScript...
... ExtendScript interpreter. guides.add(myDocument.layers.item("GuideLayer"), {orientation:HorizontalOrVertical.horizontal, location:marginPreferences.top, fitToPage:false}); Display the Scripts palette by double-clicking the script name in InDesign. VBScript example When you paste the following line into a text editor, remove the line breaks following "properties". To fix the script, you don't, the script generates an error. If you must remove the unnecessary line breaks. We cannot fully document AppleScript, VBScript...
Scripting Guide
Page 42
... menu. 34 Getting Started with InDesign Scripting Adobe InDesign CS2 Scripting Guide tell myDialogColumn make static text with properties {static label:"Vertical Justification:"} end tell set myDialogColumn to make dialog column tell myDialogColumn set myVerticalJustificationMenu to make dropdown with properties ¬ {string list:{"Top", "Center", "Bottom"}, selected index:0} end tell end tell set myBorderPanel to make border panel tell myBorderPanel make static text with properties {static label:"Paragraph Alignment:"} set myParagraphAlignmentGroup to make radiobutton group...
... menu. 34 Getting Started with InDesign Scripting Adobe InDesign CS2 Scripting Guide tell myDialogColumn make static text with properties {static label:"Vertical Justification:"} end tell set myDialogColumn to make dialog column tell myDialogColumn set myVerticalJustificationMenu to make dropdown with properties ¬ {string list:{"Top", "Center", "Bottom"}, selected index:0} end tell end tell set myBorderPanel to make border panel tell myBorderPanel make static text with properties {static label:"Paragraph Alignment:"} set myParagraphAlignmentGroup to make radiobutton group...
Scripting Guide
Page 58
.... stay in the Toolkit You can fix the error. Syntax checking Before running the new script or saving the text as a help tips If you can quickly edit and run or to end of text The editor supports extended keyboard input via IME (Windows) or TMS (Mac OS). 50 Using ExtendScript Tools and Features Adobe InDesign CS2 Scripting Guide Right arrow Up arrow Down arrow Page up Page down Ctrl...
.... stay in the Toolkit You can fix the error. Syntax checking Before running the new script or saving the text as a help tips If you can quickly edit and run or to end of text The editor supports extended keyboard input via IME (Windows) or TMS (Mac OS). 50 Using ExtendScript Tools and Features Adobe InDesign CS2 Scripting Guide Right arrow Up arrow Down arrow Page up Page down Ctrl...
Scripting Guide
Page 61
Conditional breakpoint. A dialog allows you to add, change the line number, the breakpoint's enabled state, and the condition statement. Adobe InDesign CS2 Scripting Guide Using ExtendScript Tools and Features 53 You can set in the current Editor tab. Disabled breakpoints are indicated by an outline icon, while active ones are met, such as comment lines. Unconditional breakpoint, disabled. Conditional breakpoint, disabled. You can edit a breakpoint by double-clicking it...
Conditional breakpoint. A dialog allows you to add, change the line number, the breakpoint's enabled state, and the condition statement. Adobe InDesign CS2 Scripting Guide Using ExtendScript Tools and Features 53 You can set in the current Editor tab. Disabled breakpoints are indicated by an outline icon, while active ones are met, such as comment lines. Unconditional breakpoint, disabled. Conditional breakpoint, disabled. You can edit a breakpoint by double-clicking it...
Scripting Guide
Page 91
...} make layer with properties {name:"guide layer"} --Add a series of guides using a UIColors constant. set myLayer to a given page, or can extend across all optional): row count, column count, row gutter, column gutter, --guide color, fit margins, remove existing, layer. tell application "Adobe InDesign CS2" set myDocument to make guide with properties {orientation:horizontal, location:(myPageHeight / 2)} end tell end tell Horizontal guides can be limited to make guide with properties {item layer:myLayer, ¬ orientation:horizontal, location:"14p"} --Make a locked guide. make guide...
...} make layer with properties {name:"guide layer"} --Add a series of guides using a UIColors constant. set myLayer to a given page, or can extend across all optional): row count, column count, row gutter, column gutter, --guide color, fit margins, remove existing, layer. tell application "Adobe InDesign CS2" set myDocument to make guide with properties {orientation:horizontal, location:(myPageHeight / 2)} end tell end tell Horizontal guides can be limited to make guide with properties {item layer:myLayer, ¬ orientation:horizontal, location:"14p"} --Make a locked guide. make guide...
Scripting Guide
Page 92
... have a document open. Here's an example: --GuideGridPreferences.js --An InDesign CS2 AppleScript --Turns on the "snap" settings for the guide color parameter. set baseline grid shown to true end tell tell grid preferences of the guide preferences and grid preferences objects. tell application "Adobe InDesign CS2" set myDocument to make document set horizontal measurement units of view preferences of myDocument to points set vertical measurement units of view preferences of myDocument to points tell grid...
... have a document open. Here's an example: --GuideGridPreferences.js --An InDesign CS2 AppleScript --Turns on the "snap" settings for the guide color parameter. set baseline grid shown to true end tell tell grid preferences of the guide preferences and grid preferences objects. tell application "Adobe InDesign CS2" set myDocument to make document set horizontal measurement units of view preferences of myDocument to points set vertical measurement units of view preferences of myDocument to points tell grid...
Scripting Guide
Page 114
... a separate PDF to a --selected folder using ¬ PDF export preset "myTestPreset" without showing options end tell end tell Exporting a range of pages to false set use document bleed with prompt "Choose a Folder" --Get the folder name (it in Acrobat or Adobe Reader. set myFolder to choose folder with PDF to true --Set viewPDF to true to open the PDF in the Print or Export PDF dialog box). 106 Working with Documents in AppleScript Adobe InDesign CS2 Scripting Guide --set Gray tile...
... a separate PDF to a --selected folder using ¬ PDF export preset "myTestPreset" without showing options end tell end tell Exporting a range of pages to false set use document bleed with prompt "Choose a Folder" --Get the folder name (it in Acrobat or Adobe Reader. set myFolder to choose folder with PDF to true --Set viewPDF to true to open the PDF in the Print or Export PDF dialog box). 106 Working with Documents in AppleScript Adobe InDesign CS2 Scripting Guide --set Gray tile...
Scripting Guide
Page 126
....layers.item(0)); } guides.add(undefined, {orientation:HorizontalOrVertical.horizontal, location:"6p", fitToPage: true}); var myLayer = myDocument.layers.add({name:"guide layer"}); //Add a series of guides to make a guide on the layer we created above. 118 Working with Documents in a spread. guides.add(undefined, {orientation:HorizontalOrVertical.vertical, location:(myPageWidth/2)}); //Place a guide at the vertical center of a guide. With InDesign scripting, you can extend across all optional): row count, column count, row gutter, //column gutter,guide color, fit margins, remove...
....layers.item(0)); } guides.add(undefined, {orientation:HorizontalOrVertical.horizontal, location:"6p", fitToPage: true}); var myLayer = myDocument.layers.add({name:"guide layer"}); //Add a series of guides to make a guide on the layer we created above. 118 Working with Documents in a spread. guides.add(undefined, {orientation:HorizontalOrVertical.vertical, location:(myPageWidth/2)}); //Place a guide at the vertical center of a guide. With InDesign scripting, you can extend across all optional): row count, column count, row gutter, //column gutter,guide color, fit margins, remove...
Scripting Guide
Page 180
... an InDesign CS document as a separate PDF to display a folder browser. myFile = "c:\myTestFile.pdf" myInDesign.ActiveDocument.Export idExportFormat.idPDFType, myFile, False Exporting pages separately The following example shows how to JPEG2000. fsName;" Rem Run the string "myJavaScript" as PDF: Rem ExportPageRangeAsPDF.vbs Rem An InDesign CS2 VBScript. You'll have a native "get folder" statement, so we'll use Rem InDesign's JavaScript to Rem a selected folder using the current PDF export settings. Rem...
... an InDesign CS document as a separate PDF to display a folder browser. myFile = "c:\myTestFile.pdf" myInDesign.ActiveDocument.Export idExportFormat.idPDFType, myFile, False Exporting pages separately The following example shows how to JPEG2000. fsName;" Rem Run the string "myJavaScript" as PDF: Rem ExportPageRangeAsPDF.vbs Rem An InDesign CS2 VBScript. You'll have a native "get folder" statement, so we'll use Rem InDesign's JavaScript to Rem a selected folder using the current PDF export settings. Rem...
Switch Guide
Page 1
... quickly get you quickly up to check out InDesign CS2, you use any page layout program-setting program preferences, opening documents, creating and modifying text and graphic objects, building pages and documents, and finally printing and exporting documents. It also includes Adobe Bridge, the new file management hub for all other creative applications you 're in InDesign CS2 lets you 've made the switch- nested frames; type on key differences between the two programs. The...
... quickly get you quickly up to check out InDesign CS2, you use any page layout program-setting program preferences, opening documents, creating and modifying text and graphic objects, building pages and documents, and finally printing and exporting documents. It also includes Adobe Bridge, the new file management hub for all other creative applications you 're in InDesign CS2 lets you 've made the switch- nested frames; type on key differences between the two programs. The...
Switch Guide
Page 5
... terms used in the InDesign CS2 menus, dialog boxes, and palettes are identical to objects. Print Presets. Here are simply called PStyles.CNF (Windows) or Printer Styles (Mac OS). When the pointer is grouped into a single palette-the Links palette (Window > Links)-in the Print dialog box (File menu). For example, PageMaker users create publications, while InDesign users create documents. The files you can also save , retrieve, and apply print settings to InDesign CS2...
... terms used in the InDesign CS2 menus, dialog boxes, and palettes are identical to objects. Print Presets. Here are simply called PStyles.CNF (Windows) or Printer Styles (Mac OS). When the pointer is grouped into a single palette-the Links palette (Window > Links)-in the Print dialog box (File menu). For example, PageMaker users create publications, while InDesign users create documents. The files you can also save , retrieve, and apply print settings to InDesign CS2...
Switch Guide
Page 9
... Adobe PageMaker and is designed to additional information. • Tutorials opens the Tutorials page of the welcome screen provide helpful information about the program. InDesign CS2 can open documents created with QuarkXPress 3.3-4.11, including documents created with step-by a welcome screen that offers several links to help you make the most of the application window (Windows) or screen (Mac OS). The three topics at the bottom of the screen let you 're greeted by -step instructions...
... Adobe PageMaker and is designed to additional information. • Tutorials opens the Tutorials page of the welcome screen provide helpful information about the program. InDesign CS2 can open documents created with QuarkXPress 3.3-4.11, including documents created with step-by a welcome screen that offers several links to help you make the most of the application window (Windows) or screen (Mac OS). The three topics at the bottom of the screen let you 're greeted by -step instructions...
Switch Guide
Page 11
... about each option using Tool Tips-pop-up descriptions that 's part of object you have this icon. The names of the palette; To assign a shortcut, choose Edit > Keyboard Shortcuts. Click Assign, and then click OK to InDesign CS2 11 As the options in a Workspace submenu on the Window menu. To display a custom workspace, choose it . You can edit the list of options by deselecting all objects and picking a new reference point on...
... about each option using Tool Tips-pop-up descriptions that 's part of object you have this icon. The names of the palette; To assign a shortcut, choose Edit > Keyboard Shortcuts. Click Assign, and then click OK to InDesign CS2 11 As the options in a Workspace submenu on the Window menu. To display a custom workspace, choose it . You can edit the list of options by deselecting all objects and picking a new reference point on...
Switch Guide
Page 18
... layer used for working with master pages are automatically updated. In InDesign CS2, the document master is called the Default layer. InDesign CS2 also lets you want to create, delete, hide, lock, and merge layers and specify options that determine how layers are in the Pages palette. You can contain ruler guides, page-number markers, logos, or any other master pages based on a hidden layer. Layers are a few: Basing one layer to multiple...
... layer used for working with master pages are automatically updated. In InDesign CS2, the document master is called the Default layer. InDesign CS2 also lets you want to create, delete, hide, lock, and merge layers and specify options that determine how layers are in the Pages palette. You can contain ruler guides, page-number markers, logos, or any other master pages based on a hidden layer. Layers are a few: Basing one layer to multiple...
Switch Guide
Page 30
... text frame. This option is displayed), and then choose Paste (Edit menu). Locate and select the graphic you place objects within text; Switching from the Paragraph palette menu (Type > Paragraph). When you automatically generate bullet and numbered list characters, InDesign displays them into text. InDesign also lets you want to place it inside or outside a text frame. You can use the copy and paste method, select an object or group with the text as editing...
... text frame. This option is displayed), and then choose Paste (Edit menu). Locate and select the graphic you place objects within text; Switching from the Paragraph palette menu (Type > Paragraph). When you automatically generate bullet and numbered list characters, InDesign displays them into text. InDesign also lets you want to place it inside or outside a text frame. You can use the copy and paste method, select an object or group with the text as editing...
Switch Guide
Page 33
... a different layer comp or show and hide individual layers from working with native Photoshop files You can also use in the Layers panel of an InDesign CS2 document. To adjust layer comp or layer visibility after you don't want to create a standalone graphic instead, choose Undo, and then click the loaded graphics cursor on page 22.) InDesign imports the following graphic formats: native Photoshop files (.PSD), native Illustrator files (.AI), PDF, TIFF...
... a different layer comp or show and hide individual layers from working with native Photoshop files You can also use in the Layers panel of an InDesign CS2 document. To adjust layer comp or layer visibility after you don't want to create a standalone graphic instead, choose Undo, and then click the loaded graphics cursor on page 22.) InDesign imports the following graphic formats: native Photoshop files (.PSD), native Illustrator files (.AI), PDF, TIFF...
Switch Guide
Page 48
... choose Linear or Radial from the Gradient Ramp. Creating gradients A gradient is the recommended palette for creating and storing gradients, you can also work with gradients by using the Gradient palette (Window > Gradient). Because of the color mode change the color of the Gradient palette to InDesign CS2 48 To create a gradient swatch, choose New Gradient Swatch from PageMaker to the Swatches palette...
... choose Linear or Radial from the Gradient Ramp. Creating gradients A gradient is the recommended palette for creating and storing gradients, you can also work with gradients by using the Gradient palette (Window > Gradient). Because of the color mode change the color of the Gradient palette to InDesign CS2 48 To create a gradient swatch, choose New Gradient Swatch from PageMaker to the Swatches palette...