How do I quickly generate multiple Find/Change queries?

The following is Extendscript code you can use. Be sure to use a plain text editor to copy this into, then save the file as a .jsx file extension and save it in your scripts folder. Instructions on copying scripts from the web can be found here:

For each line in between the two brackets in myQueries, add them in the format illustrated: Bracket, Find query in quotes, comma, change query in quotes, closing bracket, comma.

Be sure to escape any characters with double backslashes, since you're inside a string. You can include unicode queries with "\\x{0101}", etc.

---

var myQueries = [

["ChangeOne", "ChangeOne"],

["FindTwo", "ChangeTwo"],

["\\x{2018}\\x{2019} ", "\\x{201D} "], //mixed quotes and space, right double-quote

["\\x{2018}\\x{2019}", "\\x{201C}"], //mixed quotes, left double-quote ["--

//etc.

];

app.findGrepPreferences = NothingEnum.NOTHING;
app.changeGrepPreferences = NothingEnum.NOTHING;

for (var i = 0; i < myQueries.length; i++) {

app.findGrepPreferences.findWhat = myQueries[i][0];

app.changeGrepPrefrences.changeTo = myQueries[i][1];

app.changeGrep();

}

app.findGrepPreferences = NothingEnum.NOTHING;
app.changeGrepPreferences = NothingEnum.NOTHING;

/r/indesign Thread