I’m not a legit scripter. These were mostly written with AI’s help, so I can’t vouch for the code—but they work for me. Many are specific to my own workflows, but I thought some other folks might find them useful. (Note: Scripts marked with the K icon are mostly (if not only) useful with a keyboard shortcut applied). Use or modify them however you like—and if they save you some trouble and you want to show your appreciation, you can buy me a beer. If you run into any issues with the scripts, you can reach me at . I also take on freelance typesetting, book interior design, and prepress/production work.


apply parent by P style

This script will prompt you to select a parent page and a paragraph style from your document. Any page on which the selected paragraph style appears will get the selected parent page applied to it.

apply parent by p style screenshotapply-parent-by-p-style.png

change blank pages to None

This should be pretty self-explanatory. The script will apply the “[None]” parent to any page in the document that doesn’t have any text or art on it. If the blank page has parent items or a page break on it, the script still considers it to be blank.

redefine selected styleK

A keyboard shortcut is essential here. I find this incredibly useful. It redefines the style without going to the styles panel

clear C styles from selected P style

When I receive manuscripts, headings are almost always locally formatted as bold in Word. After I apply my character styles in InDesign, these have a bold character style applied. When paragraph styles are applied (I use Multi-Find/Change to apply globally, so “clear character styles” isn’t an option) the bold character style is still applied.

clear c styles from selected p style 1 screenshotclear-c-styles-from-selected-p-style-1.png

In this example, the paragraph style's font style is Light. Place your cursor in any paragraph using that style and run the script — it will remove the character style from every instance of that paragraph style in the document.

clear c styles from selected p style 2 screenshotclear-c-styles-from-selected-p-style-2.png

apply P style up to closing tag

Most of the Word files I pour into my InDesign documents use tags to indicate where a new style begins (e.g., <H1>) and ends (e.g., </>). Let’s say I have an extract (<EXT>) in my manuscript, this script will prompt you to enter the tag and select the paragraph style that should be applied to those paragraphs.

apply p style up to closing tag 2 screenshotapply-p-style-up-to-closing-tag-2.png

This script applies the paragraph style to all paragraphs between those tags, then removes the tags.

apply p style up to closing tag 1 screenshotapply-p-style-up-to-closing-tag-1.png
apply p style up to closing tag 3 screenshotapply-p-style-up-to-closing-tag-3.png

In this particular example, this doesn’t get you all the way there, but big chunks of text throughout your document are automatically styled and cleanup is much easier. In many cases, however, it is one and done. I recommend temporarily using a unique character color in the paragraph styles you are applying, so they stand out when you're going back through your document.

apply p style up to closing tag 4 screenshotapply-p-style-up-to-closing-tag-4.png

GREP share

This script lets you transfer GREP styles from one paragraph style to another. First it prompts you to select the source style and destination style.

grep share 2 screenshotgrep-share-2.png

Then you can select the GREP style(s) you want to share. You select the GREP style(s) by number—separated by a comma if selecting multiple—or enter “all” to share all of that style’s GREP styles.

grep share 1 screenshotgrep-share-1.png

text anchor - bookmark by P style

I actually created this one for the InDesign mockup of this web page and thought it could be useful to others. For the hyperlinks, I needed to add a text anchor (and/or bookmark) at the beginning of each red style name, and I wanted those text anchors (and/or bookmarks) to have the same name as the style. Place your cursor in the story, and when you run this script it will prompt you to select a paragraph style.

text anchor bookmark by p style 3 screenshottext-anchor-bookmark-by-p-style-3.png

Hit “OK” and a text anchor (and/or bookmark) will be added to the beginning of every instance of that paragraph style, and the text anchors (and/or bookmarks) will be named according to the text of that paragraph style.

text anchor bookmark by p style 2 screenshottext-anchor-bookmark-by-p-style-2.png
text anchor bookmark by p style 1 screenshottext-anchor-bookmark-by-p-style-1.png

poetry alignmentK

I like to set blocks of poetry flush left on the longest centered line. For years I did this manually and it was a drag. Now, I just select the block I want to re-align and run the script. If you use this enough, it is definitely worthy of a keyboard shortcut.

poetry alignment 1 screenshotpoetry-alignment-1.png
poetry alignment 2 screenshotpoetry-alignment-2.png

set sink ruleK

I almost always use a “Keep In Frame,” invisible rule to sink items on a page. This script prompts you for an offset value (in picas)—a rough guess for a starting point (default is 6).

set sink rule 1 screenshotset-sink-rule-1.png

Once you hit “OK,” it creates an invisible rule with the values populated for the proper sink. From there you can create or redefine a paragraph style. For me, it is surprisingly useful.

set sink rule 2 screenshotset-sink-rule-2.png

tracking_gain a lineK

A keyboard shortcut is necessary for this, but I use it all the time. If I need to gain a line in a paragraph, this script will apply the smallest amount of tracking needed to do so—stopping at +20. Just highlight the paragraph and run the script.

tracking_lose a lineK

A keyboard shortcut is necessary for this, but I use it all the time. If I need to lose a line in a paragraph, this script will apply the smallest amount of tracking needed to do so—stopping at –20. Just highlight the paragraph and run the script.

toggle no breakK

This script is most useful if you apply a keyboard shortcut. Going to the Character panel’s hamburger menu was too time-consuming for me, so I made this script to apply/remove manual No Break from selected text.

generate checklist note

I use the Notes panel constantly during the course of a project so I can go back and check or fix things later on in the process. I’m also big on checklists and have a list of things I always check at the end of a job. I made this script to insert a pre-written checklist at the very beginning of my document—it will insert the note wherever your cursor is.

If you open the .jsx file in a text editor, you can customize your checklist starting on line 32. Every line should end with + "\r" + and the last line in the list should end with a ;

generate checklist note 1 screenshotgenerate-checklist-note-1.png
generate checklist note 2 screenshotgenerate-checklist-note-2.png

Add AltText ExtDescr - Bridge 3.0

This one is actually a script for Adobe Bridge, conceived by me and adapted by Keith Gilbert from an earlier script written for me by another master, Kasyan Servetsky—his website is down, but I’m sure you can find his scripts out there.

This script enables you to apply alt-text to files’ metadata via Bridge. Make an XLSX file with columns for “FILE NAME” and “ALT-TEXT”—see also export links report.

add alttext extdescr bridge 3 0 1 screenshotadd-alttext-extdescr-bridge-3-0-1.png

Then, in Bridge, go to the folder of images, select all, and run the script. It will prompt you to select the XLSX file, then voilà!

Before

add alttext extdescr bridge 3 0 2 screenshotadd-alttext-extdescr-bridge-3-0-2.png

After

add alttext extdescr bridge 3 0 3 screenshotadd-alttext-extdescr-bridge-3-0-3.png

caption-image alignmentsK

A keyboard shortcut isn’t essential for this script, but it helps. The script will automatically align a caption text frame with an image. Select the image and caption text frame and run the script.

caption image alignments 2 screenshotcaption-image-alignments-2.png
caption image alignments 3 screenshotcaption-image-alignments-3.png

You will be prompted to select a number (1, 2, 3, 7, 8, or 9). The positioning logic is based on the number pad: 1 = bottom, left. 2 = bottom, center. 3 = bottom, right. 7 = top, left. 8 = top, center. 9 = top, right. The default is 2 because that’s what I use most.

caption image alignments 1 screenshotcaption-image-alignments-1.png

image DPI report generator

This script creates a .txt file report that lists all files in a document that are under 255 effective DPI.

image dpi report generator screenshotimage-dpi-report-generator.png

panel divider

I made this for prepping graphic novels for accessibility features, but I can see it being useful outside of that. If you want to break up a link into multiple links without changing the appearance of the page, draw frames around each part you want to isolate—I recommend a small bit of overlap.

panel divider 1 screenshotpanel-divider-1.png

Select all drawn frames and the underlying image (per page), and run the script.

panel divider 2 screenshotpanel-divider-2.png

populate custom alt-text from CSVK

The next step in this graphic novel accessibility process is to apply the alt-text to the divided frames. Select a frame and run the script. You will be prompted to select a CSV file and the cell in which the alt-text lives.

populate custom alt-text from CSV - 1 screenshotpopulate custom alt-text from CSV - 1.png
populate custom alt-text from CSV - 2 screenshotpopulate custom alt-text from CSV - 2.png

Click “OK” and the altext is applied to the selected panel.

populate custom alt-text from CSV - 3 screenshotpopulate custom alt-text from CSV - 3.png

export multiple PDFs by range

This script will export multiple PDFs from a document and give you the option to name each individual PDF. Enter page number/range and file name separated by a pipe with spaces on either side.

export multiple pdfs by range screenshotexport-multiple-pdfs-by-range.png

export two PDFs at once

My clients often want a high-resolution and low-resolution PDF for every round of proofs.

export two pdfs at once screenshotexport-two-pdfs-at-once.png

package file with two PDFs

Like export two PDFs at once, this script will package a file and let you select two PDF export presets and name each PDF.

package file with two pdfs screenshotpackage-file-with-two-pdfs.png