Members Only

A Script to Reset InDesign’s Find/Change

A free script for clearing the fields and options in InDesign's Find/Change dialog box.

InDesign’s Find/Change feature is very powerful but the user interface lacks polish in some places. For example, the window doesn’t have buttons to clear the Find What and Change To fields in the Text and GREP tabs.

The Find Format and Change Format fields both offer buttons to clear them. Find What and Change to do not.

If you use Find/Change a lot you know it’s cumbersome to clear the fields manually. And it can be a real problem if you didn’t notice there’s a space in the Change To field. You may think that you’re applying a paragraph style or a character style to all text that matches your search criteria, but instead you delete it all (replacing it with the space).

So, to address this problem, here’s a simple two-line script that resets the GREP tab:

app.findGrepPreferences = app.changeGrepPreferences = app.findChangeGrepOptions = null;
app.findChangeGrepOptions.searchBackwards = false;

It clears the Find What and Change To fields, clears Find Format and Change Format, resets the option icon buttons (ignore parent pages and locked layers, enable footnotes), and sets the search direction to Forward.

If you want a version of the script that works for the Text tab as well, simply duplicate the script and edit it to replace all instances of Grep with Text.

You can download both versions of the script here.

Need help installing a script? Read this post.

Bookmark
Please login to bookmark Close

Not a member yet?

Get unlimited access to articles and member-only resources with a CreativePro membership.

Become a Member

Comments (4)

Leave a Reply

Your email address will not be published. Required fields are marked *

Loading comments...