Perform multiple find/change (or GREP) queries at once

The find/change dialog box is a useful tool in InDesign until many searches need to be done at once. For example, an imported word processor file contains double spaces, double returns, spaces at the start of lines etc that need to be tidied. Using solely find/change, each item needs to be found and changed before the next item can be found and changed, meaning typing in the find field, then the change field, then change (or change all). This applies to GREP searches as well.

Ultimately, is there a way to perform many find/changes to text at once? Luckily, the answer is yes, there are several. Will they also change more than the text (such as formatting), not all methods outlined will do this. Some solutions listed below are still in Beta testing, while others may or may not work with Creative Cloud. Links to the providers of each solution has been provided for those seeking more information.

First method – default script (with outside assistance)

There is a script that ships with InDesign called findchangebylist.jsx. This script runs many find/change commands that are stored as text in another file called FindChangeList.txt.

By changing specific lines in the script and making and renaming copies of the FindChangeList.txt file, many different “chained searches” can be made and stored for later use.

Because the code used in the FindChangeList.txt file is rather cody, scripter Kasyan Servetsky has created a script that will take whatever is in the find/change dialog box and turn it into code that can be cut and pasted into the FindChangeList.txt file.

For regular visitors to this site, this article may seem like déjà vu, and that is because this solution has been discussed on Colecandoo before:

https://colecandoo.wordpress.com/2011/08/25/make-findchange-behave-more-like-a-word-macro/

Second method – scripts:

GREP Queries Manager by Peter Kahrel

Unlike the first method, this has a user interface and deals with GREP searches rather than both GREP and find/change searches.

For full details on how it works, go to: http://www.kahrel.plus.com/indesign/grep_query_manager.html

Doquery by Mikhail Ivanyushin

Again, this has a user interface and can use find/changes or GREP searches that have been previously used and saved with the find/change dialog box.

For full details on how it works, go to: http://adobeindesign.ru/2012/10/27/doquerylist-programma-obrabotki-teksta-zaprosami/

Batch find and replace by Fabiantheblind

This solution does not have a user interface but rather works in a similar fashion to InDesign’s default script but uses Fabian’s own expression language.

For full details on how it works, go to: https://github.com/fabiantheblind/batch-find-and-replace

Kerntiff’s Xchange

This solution has a user interface and can perform many find/changes at once, whether regular find/change or GREP.

For full details on how it works, go to: http://www.kerntiff.co.uk/free-stuff/xchange-strings-xstrings

Third method – plug-ins

Automatication

This plug-in has a user interface and what the find/change dialog box in InDesign should really have shipped by default. Nevertheless it is cheaper than a slab of beer and will last much much longer.

For full details on how it works, go to: http://automatication.com/

Action Recorder (Rorohiko)

While still in the Beta stage, Rorohiko is attempting to make what is arguably missing from the InDesign menu: the Actions palette.  Other than running find/change commands, this extension allows much more chaining and automation of other non-text based tasks, but at the time of writing is still too early to tell.

For full details on how to become involved, go to: http://www.rorohiko.com/wordpress/2013/08/06/action-recorder-beta-released/

 

Advertisements

About colmin8r
A prepress operator since 1997 specialising in Adobe InDesign.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: