Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

017 Running a script

From: InDesign Secrets

Video: 017 Running a script

Anne-Marie Concepcion: You know it always shocks me when InDesign can't do everything. You know, when there are features missing, because by this time you think of it would have come up with every single feature and added it to the program, but the good thing is that InDesign is very scriptable. It's very easy to add scripts, sort of like little mini programs that add the features that for some reason the InDesign engineers didn't add to the program itself. The scripts community is very rich in InDesign and what I want to show you in this video is how you might locate scripts and then how you install them and how you use them.

017 Running a script

Anne-Marie Concepcion: You know it always shocks me when InDesign can't do everything. You know, when there are features missing, because by this time you think of it would have come up with every single feature and added it to the program, but the good thing is that InDesign is very scriptable. It's very easy to add scripts, sort of like little mini programs that add the features that for some reason the InDesign engineers didn't add to the program itself. The scripts community is very rich in InDesign and what I want to show you in this video is how you might locate scripts and then how you install them and how you use them.

It's surprising to me that so few InDesign users who depend on it for their daily living, don't even know that there are free scripts that come with the program. So let's take this one example. Here we have a document with two different tables. Now say that I heard from the client and they say "you know what, we want this to be one table." So like well how can I select these two tables and make them into one? I mean there is no Merge Tables. There is just a Merge Cells command. You think "oh man, I am going to have to figure out how to do this and add empty rows and copy and paste," but actually there is a Merge Tables script around and I read about it some place and I know that it's here in this website in-tools.com.

INtools is a company that makes free and commercial scripts and plug-ins for Adobe InDesign, and in their scripts page, they have one called Table Merger. This is a simple script which merges two tables. But before I go ahead and download that, let's talk a little bit about where you might find the script in InDesign and then we'll go ahead and install that Table Merger script. So in InDesign-- and we are in CS 5.5 right now. In 5.5, and I believe in 5 as well, the Scripts panel is hiding down here in Utilities.

You choose Scripts. In earlier versions of InDesign you'll find it under Window > Automation and then there will be fly out that says Scripts Automation, but here we're in Utilities. So you open up Scripts and I am just going to drag this panel out so we can concentrate on it. Here's two folders, Application and User, and what that means is there are scripts that are installed at the application level so anybody who logs on to this computer can use them, or there are scripts that are private only to the current user and right now that folder is empty. I don't have anything installed.

But in Applications, there are always going to be some free sample scripts is what they call it. Now I am on a Macintosh so there are two flavors of scripts. One is AppleScript which is Mac only; the other one is JavaScript which is by platform. So the same JavaScript scripts can be run on both Mac computer and a Windows computer. Now if I were on Windows, I'd see samples, but it would say JavaScript and VBScript. VBScript is Windows only. Essentially the scripts are the same so in AppleScript, AddGuides, AddPoints, AdjustLayout, in JavaScript, AddGuides, AddPoints, AdjustLayout.

And actually these are here to help people who want to learn how to script practice some essential concept because InDesign does ship with a PDF about how to script InDesign. But I'm not teaching you how to actually script. What's interesting is that a lot of these object lesson scripts actually do very useful things and to run a script all you need to do is double-click something. So like for example, if I make a selection, let me just drag out a little square here and I have it selected and then I choose for example CropMarks, I get a little dialog box that says where do you want me to put the CropMarks, should I include Registration Marks? Where should I draw the marks around each object or just the entire selection? I'll say the Selection and it made little crop marks around my selection.

So there are all sorts of interesting things that these scripts can do. Unfortunately, I'm not finding Merge Tables here, right? So there's no Merge Tables script here, but I did hear about that one that was offered for free at the in-tools.com website. Now the question is how do I get that script into my Scripts panel? It's actually really simple. You don't have to quit InDesign and by the way the instructions that I am showing you here on the Mac also work exactly the same in Windows. In fact it's a lot easier if you start up the program and open up your Scripts panel, because if you right-click on the folder that you want your new script to go into, it will bring you right to it in the OS. So on a Mac it will bring you to that folder in the Finder and on Windows it will bring you to that folder in Windows Explorer.

So let's say that I want to install that script and have it available for anybody who uses this computer. That means I want to install it in the Application area and I'll go ahead and install it inside the Samples folder. So I am just going to right click on the Samples folder and choose Reveal in Finder. It opens up a window in the Finder that shows me exactly where that is. There is the AppleScript and JavaScript. And if I go to the left, you can see that actually we are in the Adobe InDesign CS 5.5 Application folder and inside there, there is a Scripts folder.

So I could do this myself actually just in the Finder. I don't have to always right-click from that folder. Inside there, there is another folder called Scripts panel and then that is where you want to install your scripts, inside the Scripts panel folder. Same on Windows and the Macintosh. You don't have to use the Samples folder. You can create your own folder. In fact I think I will. I am just going to select this and then go to New Folder and I'll call this my scripts. Now this is the folder that I want to install the script in. So I am going to now go back that web site and download the script Table Merger. It is a zip file.

I am going to go ahead and say yes, open it up with StuffIt Expander. Now I need to find out where that file got downloaded to. If I didn't have my Downloads window open, I could have opened it from Firefox's Tools menu. There's Downloads. There is the Tables, Show in Finder, there it is, and we've already unzipped it. So I am just going to move this over to the Desktop and we'll take a look. This is .jsx. That stands for a JavaScript script and a JavaScript script is simply a text file. Now you could open it with, you know, the actual program that Adobe ships with every installation of the Creative Suite, called The ExtendScript Toolkit.

It's a special program just for writing JavaScript. But I want to show you that I can even open it in TextEdit, that it's a simple text file. It's all it is, just a text file that ends with .jsx. Now I want to put this scripts into the my scripts folder, so I'll just drag and drop it right in there. Now when we go back to InDesign, notice that it automatically added my scripts as soon as I created that folder and inside there is a Merge Tables JavaScript. So now I am just going to select my two tables. Just drag across both of them and double-click MergeTables.jsx.

Merge Below or Merge Beside. I want to merge it below, there it goes. Now I actually experimented with this script first before I demoed it, because I wasn't sure if it would be smart enough to merge two tables that were separated by a paragraph and that's what you need to do a lot of times. You need to experiment with the script, especially the ones that are free, because they don't often come with documentation. Now the ones on this website, if you remember in-tools.com, actually does come with documentation. So I could have read more about it, but sometimes some scripts require selection and you don't know some scripts don't work if you have something selected.

Other places that you might find scripts, other than just you know on developer's websites, will be in any form having to deal with the InDesign or a web site like on our own indesignsecrets. com web site. We talk about scripts all the time and some of them we add to this Resources page, Plug-ins and Scripts, but you can download them and then you would install it just as I showed you. A lot of times some of the best scripts aren't even sold or listed as a script. Scripters, who are very handy with scripting, would just go ahead and type out a script in a form post or in a comment in a blog.

Like for example here's one on our website where people were mentioning to us that in InDesign CS5 when you export a facing pages document to an interactive PDF, it always has spreads turned on. There's no control in the Export Interactive PDF to split that up into single pages and somebody said "how do I make a single page interactive PDF from a Facing Pages document, is it possible?" 62 people are vitally interested in this question and if I scroll down a bit, you will see that a couple of scripters took a whack at it, right.

So here's one that adds comments and all sorts of stuff. Now what do you do with something like this? It's actually quite simple. Remember how I showed you how that JavaScript is simply a text file. All you need to do is select the text, get every bit of it, copy it to the clipboard, start up any text editor that you might have running like TextEdit on the Mac. Make sure that you are working in Plaintext mode. You don't want to have RTF or styling enabled, and then paste what you have. Then you just save that file. I'll save this on my Desktop as splitspread and then you want to add the jsx extension. Otherwise InDesign won't recognize it as a script.

It might be that you better say yes, Use .jsx. All right! So let's find that in the Finder, here it is. I'll copy that to my Clipboard and go back to that same folder, my scripts, and I'll paste it in there. And now when we go back to InDesign, there it is, ready to use whenever I want to automatically split a spread when I am creating an interactive PDF. So make sure and check out the rich community of scripters and all of the cool free and low-cost commercial scripts that are out there for InDesign.

Show transcript

This video is part of

Image for InDesign Secrets
InDesign Secrets

172 video lessons · 78758 viewers

Anne-Marie Concepción and David Blatner

Expand all | Collapse all
  1. 5m 48s
    1. 172 Fun with placeholder text NEW
      5m 48s
  2. 15h 24m
    1. 001 Intro to InDesign Secrets
    2. 002 The hidden "auto-expand text" feature
      5m 51s
    3. 003 Letting InDesign do the math for you
      3m 15s
    4. 004 The indispensible Quick Apply feature
      5m 29s
    5. 005 Customizing the Links panel
      6m 53s
    6. 006 Magically building graphs with the Chartwell font
      7m 43s
    7. 007 Using the Eyedropper tool to pick up character or paragraph attributes
      3m 21s
    8. 008 Selecting through and into objects using cmd-click and Select Above/Below
      5m 46s
    9. 009 Some great tips and tricks for the Swatches panel
      9m 40s
    10. 010 Saving down for backward compatibility with INX and IDML
      5m 55s
    11. 011 Using the INX and IDML formats to fix problems
      4m 46s
    12. 012 InDesign's Easter eggs
      5m 0s
    13. 013 Three cool GREP styles everyone can use
      7m 35s
    14. 014 A field guide to special characters
      8m 2s
    15. 015 Trashing the application preferences to solve weird behaviors
      4m 42s
    16. 016 Aligning numbered lists by decimal points
      3m 10s
    17. 017 Running a script
      9m 33s
    18. 018 When text disappears from a text frame
      6m 18s
    19. 019 Preview and Presentation modes (changing color, etc.)
      4m 8s
    20. 020 Using multiple windows for comparisons
      3m 35s
    21. 021 Putting images on a stroke
      5m 23s
    22. 022 Making your own motion path
      5m 43s
    23. 023 Copying objects between Illustrator and InDesign
      6m 53s
    24. 024 Using layer comps in Photoshop files to show alternates in InDesign
      4m 19s
    25. 025 Adding custom HTML tags to EPUB/HTML exports
      5m 32s
    26. 026 Tracking down type issues with the composition highlighter
      8m 13s
    27. 027 Managing your InDesign panels
      5m 46s
    28. 028 Creating running heads using variables
      5m 1s
    29. 029 Live Caption tips and tricks
      8m 3s
    30. 030 Making professional drop caps
      10m 37s
    31. 031 Making two-state buttons in interactive documents
      5m 5s
    32. 032 Moving pages from one document to another
      3m 15s
    33. 033 Wrapping bulleted text around a curve
      5m 58s
    34. 034 Importing a custom dictionary
      7m 8s
    35. 035 Changing document orientation and page size
      6m 45s
    36. 036 Numbering instead of using auto page numbers
      6m 23s
    37. 037 Setting story order with the Articles panel
      8m 3s
    38. 038 Updating a linked table without losing formatting
      5m 38s
    39. 039 Creating electronic sticky notes
      4m 49s
    40. 040 Moving master page items to the top layer for visibility
      2m 48s
    41. 041 Five guide tricks that will impress your coworkers
      6m 18s
    42. 042 Letting InDesign add the diacritics
      4m 21s
    43. 043 Using single-cell table cells for custom paragraph formatting
      6m 2s
    44. 044 Formatting fractions correctly
      8m 11s
    45. 045 Fixing unwanted hyperlinks in an imported Word file
      5m 57s
    46. 046 Inline graphic tricks with invisible paragraphs
      4m 21s
    47. 047 Ensuring the first line of every chapter starts in the same spot
      3m 1s
    48. 048 Specifying an exact amount of space between objects
      5m 17s
    49. 049 Fixing last lines that are too short
      8m 16s
    50. 050 Creating web graphics from your InDesign artwork
      7m 20s
    51. 051 Using “No Language” to suppress unwanted hyphenation, spell-checking, and smart quotes
      2m 48s
    52. 052 Five things that should be in every new file
      5m 19s
    53. 053 Forcing EPUB page breaks with invisible objects
      6m 21s
    54. 054 Understanding component information
      6m 39s
    55. 055 Creating running heads using section markers
      4m 16s
    56. 056 Making a font with InDesign using the IndyFont script
      5m 20s
    57. 057 Finding where that color is used
      7m 17s
    58. 058 Text wrapping
      6m 54s
    59. 059 Inserting pages: Understanding the Pages panel
      4m 20s
    60. 060 Copying paths between Illustrator and InDesign
      5m 14s
    61. 061 Automating Find/Change with the Find/ChangeByList script
      12m 48s
    62. 062 Embedding images
      7m 43s
    63. 063 Adjusting leading inside a paragraph
      4m 31s
    64. 064 Placing one InDesign file inside another
      3m 58s
    65. 065 Creating bookmarks for PDFs
      7m 25s
    66. 066 Customizing the story editor preferences
      6m 4s
    67. 067 Setting the size of text exactly with this free script
      3m 28s
    68. 068 Using Gravity to simulate perspective
      3m 15s
    69. 069 Fixing the overflowing text frame problem in EPUBs
      5m 0s
    70. 070 Ten uses of the Story Editor
      11m 39s
    71. 071 Moving an object: Ten ways!
      7m 18s
    72. 072 Understanding optical margin alignment (and the quote trick)
      4m 23s
    73. 073 Changing the shape of any frame with the pen tool
      6m 12s
    74. 074 Working with sets in the content conveyor tool
      10m 40s
    75. 075 Running text along the top and the bottom of a circle
      3m 51s
    76. 076 Creating a list using the Table of Contents feature
      3m 25s
    77. 077 Quickly threading frames together and unthreading frames
      13m 22s
    78. 078 The secrets of formatting objects with Find/Change
      6m 34s
    79. 079 Using ruler guides: 10 great tricks
      5m 3s
    80. 080 Converting a clipping path to a frame
      4m 24s
    81. 081 Adding a drop shadow to a single word inside a frame
      3m 14s
    82. 082 Creating a custom cross-reference format
      13m 53s
    83. 083 Putting different-sized pages on a single spread
      3m 7s
    84. 084 Formatting prices with nested and grep styles
      6m 21s
    85. 085 Checking out the Gridify tricks
      5m 17s
    86. 086 Using Illustrator to create InDesign gradient swatches
      4m 49s
    87. 087 Building a simple grep style to change character size
      3m 45s
    88. 088 Exporting a grayscale PDF
      3m 16s
    89. 089 Three ways to cheat text outside of its frame
      6m 8s
    90. 090 Three great Object Styles for any designer
      8m 1s
    91. 091 Choosing alpha channel image transparency
      2m 25s
    92. 092 Adding and reading metadata for InDesign files
      3m 25s
    93. 093 Adding ALT tags to your images
      6m 59s
    94. 094 How to Place & Link a text frame's text but not its formatting
      7m 4s
    95. 095 Setting the baseline position of a caption
      2m 39s
    96. 096 Managing changing pages with primary text frames
      5m 23s
    97. 097 Secrets of the Info panel
      7m 31s
    98. 098 Surprising ways to do a word count
      5m 29s
    99. 099 Placing an object where you want it with an object style
      6m 18s
    100. 100 Aligning Objects tips and tricks
      5m 10s
    101. 101 Applying corner options to any shape
      2m 17s
    102. 102 Converting footnotes to endnotes with a free script
      4m 49s
    103. 103 Making tab leaders pretty
      4m 18s
    104. 104 Converting text to outlines the right way
      4m 30s
    105. 105 Turning InDesign into a speed demon
      8m 31s
    106. 106 Working with MiniBridge
      5m 45s
    107. 107 Customize your QR codes
      6m 17s
    108. 108 Using the same keyboard shortcut for two different commands with the Context feature
      5m 22s
    109. 109 Making a text highlighter
      3m 33s
    110. 110 Updating an interactive PDF without losing work done in Acrobat
      5m 31s
    111. 111 Adding custom text at the beginning of each line automatically
      4m 0s
    112. 112 Packaging images on the pasteboard
      3m 32s
    113. 113 Automatically updating figure references for books
      6m 9s
    114. 114 Adding Tool Tips to your form fields in InDesign
      3m 21s
    115. 115 Setting poetry, flush left, center on longest line
      3m 54s
    116. 116 Use bookmarks to navigate long documents in production
      4m 57s
    117. 117 Selecting text with the InDesign keyboard dance
      2m 0s
    118. 118 Including a total page count in your page numbers
      6m 19s
    119. 119 Making a custom arrowhead
      5m 37s
    120. 120 Making alternative body text styles for fast typesetting
      5m 4s
    121. 121 Making InDesign patterns with the free PatternMaker
      3m 45s
    122. 122 Creating pull quotes the easy way
      5m 1s
    123. 123 Allow text frame to resize with text
      2m 43s
    124. 124 Mapping Word styles to InDesign styles
      5m 48s
    125. 125 Make two automatically threaded text flows
      3m 37s
    126. 126 Saving for Web in InDesign
      6m 7s
    127. 127 Numbering rows in a table
      5m 10s
    128. 128 Making automatic jump lines
      6m 52s
    129. 129 Turning off allow pages to shuffle in order to separate facing pages
      3m 40s
    130. 130 Dealing with parentheses around text size
      4m 19s
    131. 131 Make a fill in the blank label for contracts and forms
      7m 53s
    132. 132 Changing the shape of polygons and starburst as you draw or afterward
      4m 17s
    133. 133 Contextual text and images that you only want sometimes visible
      4m 55s
    134. 134 Creating nav points in a movie
      4m 31s
    135. 135 Adding effects to your rule above and rule below
      3m 38s
    136. 136 Fitting text to a specific size
      4m 45s
    137. 137 Quick tips for making a small PDF file size
      6m 9s
    138. 138 Sharing presets, workspaces, and custom shortcuts sets
      5m 17s
    139. 139 Making a multi-level numbered list
      5m 17s
    140. 140 Faking bold and italic when the font family doesn’t have one
      5m 2s
    141. 141 Keeping the same scale size when updating or relinking to images
      3m 9s
    142. 142 Inserting glyphs
      6m 42s
    143. 143 Building richer, bolder color gradients
      3m 7s
    144. 144 Finding the right font with InDesign’s font menus
      4m 35s
    145. 145 Lay out a front, back and spine for a book jacket
      6m 12s
    146. 146 Ghosting area of image behind text
      2m 53s
    147. 147 Make a transparency mask in InDesign
      3m 45s
    148. 148 Using preflight to find common document errors
      6m 11s
    149. 149 Cropping with paste into
      5m 18s
    150. 150 Using vertical justification to spread out text in a frame automatically
      5m 16s
    151. 151 Rotate text inside a frame, or the frame around the text
      2m 30s
    152. 152 Looking at snippets vs. libraries
      6m 49s
    153. 153 Import a folder full of pictures, one per page
      8m 54s
    154. 154 When InDesign ignores your leading values
      4m 5s
    155. 155 Extracting images from a Word document
      3m 42s
    156. 156 Uncommon uses for Quick Apply
      6m 2s
    157. 157 Uncovering InDesign's magic font folders
      3m 9s
    158. 158 Sharing swatches (PS/IL/ID and ID to ID)
      3m 36s
    159. 159 Convert rounded corners to editable paths
      3m 15s
    160. 160 Convert local formatting to character styles
      5m 14s
    161. 161 Sort an index by page number
      7m 49s
    162. 162 Keeping page numbers on top of master items
      3m 55s
    163. 163 Adding automatic currency symbols in a table cell or before text
      3m 50s
    164. 164 Make a pop-up footnote for your ebook
      3m 48s
    165. 165 Deleting tabs at the beginning of paragraphs and applying a paragraph style
      3m 10s
    166. 166 Five InDesign Presentation tips
      6m 28s
    167. 167 Creating blank entry spaces on forms
      3m 53s
    168. 168 Creative uses of the Slug area
      4m 45s
    169. 169 Change the UI languaging in InDesign CS6 and CC
      3m 14s
    170. 170 All about All Caps (change case, open type option)
      4m 36s
    171. 171 Batch convert InDesign files to IDML and other formats
      2m 35s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.

Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.

Mark all as unwatched Cancel


You have completed InDesign Secrets.

Return to your organization's learning portal to continue training, or close this page.

Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.