Skip to main content
Participating Frequently
November 3, 2022
Question

FindChangeByList

  • November 3, 2022
  • 2 replies
  • 342 views

I am trying to use FindChangeByList.jsx to run a sequence of changes and having some difficulties. I'm hoping someone who understands better how to use this script (and the formatting of the FindChangeList.txt file) can tell me how I'd enter the Find/Change shown below into the FindChangeList.txt file. The purpose of this Find/Change is a GREP to locate all paragraphs where the first line begins with an indent of .5" and change them to a Tab with no indent. The query works perfectly.

 

 

 

This topic has been closed for replies.

2 replies

Peter Kahrel
Community Expert
Community Expert
November 7, 2022

> Do you know if there is any place that one could see the proper names to use for the formatting options

 

Not really. you have to be familiar with the object model. You could trawl through

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#about.html

but that's pretty daunting for non-scripters. Easiest is to ask in this forum.

 

> e.g. I suspect it might be characterColor:"R0_B0_G0" if one wanted black text

Nope. it's fillColor: "Black"

 

An alternative to FindChangeByList.jsx is this script:

https://creativepro.com/files/kahrel/indesign/grep_query_runner.html

The advantage of this one is that you use InDesign to define queries so that you don't have to look things up in the object model.

Loic.Aigon
Legend
November 3, 2022

The script uses a side txt file (I think you got that part) and it explains how you should use it but doesn't cover the formatting options. Good thing is that the txt file is basically a set of javascript properties for the find and change GRE preferences that are passed to the F/C engine.

So all that you need to do is to add thos formatting options in both the find and change objects like this:

 

grep	{findWhat:"^",firstLineIndent:"0.5in"}	{changeTo:"\\t",firstLineIndent:0}	{includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}	Replace 0,5in first line indented paragraphs by tabbed paragraphs.

 

Once you set the firstLineIndent property, you got the expected behavior.

HTH

Loic

Participating Frequently
November 4, 2022

THANK YOU!

Do you know if there is any place that one could see the proper names to
use for the formatting options. e.g. I suspect it might be
characterColor:"R0_B0_G0" if one wanted black text but it would be useful
to see all the proper names

Community Expert
November 4, 2022

Hello - I removed your personal info. If replying by email could you please ensure your signature is turned off. 🙂