Presentation is loading. Please wait.

Presentation is loading. Please wait.

DMED1100 InDesign Advanced Class 8. Agenda  Scripting  Introduction to XML 2.

Similar presentations


Presentation on theme: "DMED1100 InDesign Advanced Class 8. Agenda  Scripting  Introduction to XML 2."— Presentation transcript:

1 DMED1100 InDesign Advanced Class 8

2 Agenda  Scripting  Introduction to XML 2

3 Scripting is Not …  Overtly challenging  Only for programmers  Just for long tasks 3

4 Running Scripts  Put the script in Adobe InDesign CS4\Scripts\Scripts Panel Could also put a shortcut to the script in the folder  Open Scripts Panel Window -> Automation -> Scripts Alt + Ctrl + F11  Double-click the script name 4 p. 683

5 Writing Scripts Three main supported scripting languages:  JavaScript InDesign has built-in support called ExtendScript Is cross-platform Doesn’t easily communicate with other (Non-CS) programs File extension.js or.jsx (preferred) 5 p. 683

6 Writing Scripts  AppleScript For the Mac OS File extension.applescript or.as 6

7 Writing Scripts  Visual Basic For Windows Three main types:  Visual Basic Script (VBScript)  Visual Basic for Applications (VBA)  Visual Basic (VB 6, VB.NET) Textbook recommends using VBScript  Can edit via text editor (NotePad or NotePad++) Could also edit using VBA  Accessible from most Office software 7

8 Writing Scripts  In Excel Developer -> Visual Basic If Developer tab is unavailable  Office Button -> Excel Options -> Popular -> Show Developer Tab in Ribbon 8

9 Writing Scripts  Any language that can connect to the platform works C, C++, C# Perl Python JScript And many others … 9

10 Scripting Tutorial  Download InDesignCS4ScriptingTutorial.pdf InDesignCS4ScriptingTutorialScripts.zip  Work through the tutorial 10

11 Using the ESTK  Full-featured text editor  Also checks syntax of script Edit -> Check Syntax  Make sure InDesign selected as target application  To turn on ID’s screen display Scripts Panel (ID) -> Options -> Enable Redraw 11 p. 700

12 Monitoring Events  Scripts can be run when events happen: Opening a document Creating a new document Saving a document Closing a document Exporting 12 p. 710

13 Menu Scripts  Scripts can run menu items or add items to menus  See Adobe InDesign CS4 Scripting Guide for more details 13 p. 712

14 Startup Scripts  Place script in a folder Startup Scripts in Scripts folder  Need to add some lines to prevent message box 14 p. 712

15 XML  Extensible Markup Language  A way to tag information in a text file Information about author  Not just an extension of HTML HTML is about formatting XML is about content 15 p. 739

16 XML Vocabulary  Tag A label for a piece of XML data Marked with angle brackets Cannot contain space characters Must be well formatted  XML Element The actual XML data Charles Dickens 16

17 XML Vocabulary  Elements may contain other elements: Charles Dickens 7 February 1812 Landport, Portsmouth 17

18 XML Vocabulary  XML Attribute Use to add information about the element  Known as Metadata  XML Comment Allow you to keep notes 18

19 XML Vocabulary  XML Processing Instructions InDesign does not use Can just delete if they exist  DTD (Document Type Definition) Description of:  What elements appear  The order of appearance Not required by InDesign 19

20 Structure View  View -> Structure -> Show Structure 20 p. 743

21 XML Tags  Tags panel Window -> Tags 21 p. 749

22 Importing XML  File -> Import XML  Import Options: Mode: Replace or Merge with existing XML Create Link: to source XML document Apply XSLT: apply a style sheet Clone Repeating Text Elements: allows automatic placement of XML elements 22 p. 757

23 Replacing XML Elements  Select structure in Structure View  Choose Import XML  Turn on Replace Content  Turn on Import Into Selected Element 23

24 Exporting XML  File -> Export  Choose XML from Format pop-up menu 24 p. 762

25 Creating Placeholders  Look at pp. 763-765 25


Download ppt "DMED1100 InDesign Advanced Class 8. Agenda  Scripting  Introduction to XML 2."

Similar presentations


Ads by Google