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 *

  1. Great! I knew about setting the preferences to null, but I’ve never tried setting the findChangeOptions to null. Didn’t realize that would work!
    Another option that doesn’t require a script: Set up a blank find/change, and store it as a find/change preset. Bonus points: Call it “AAANothing” so it’s always at the top of the list and easy to find…

    1. Mike Rankin

      I love that idea! Thanks, Ariel.

  2. Jean-Claude Tremblay

    You can combine both to reset Text and GREP windows with a single script.

    I have one that reset Text, GREP and Object Windows. Assign a shortcut to it and it’s easy to clean the find/Change windows.

  3. Michel Vrana

    Adding the Text reset steps before the last “}” in Jongware’s excellent Preptext script fixes my only gripe with that script! Now the find/change is clear after running Preptext.