• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

FindChangeByList

Community Beginner ,
Nov 03, 2022 Nov 03, 2022

Copy link to clipboard

Copied

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.

 

user7048405_1-1667500897804.png

 

 

TOPICS
Scripting

Views

79

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 03, 2022 Nov 03, 2022

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 04, 2022 Nov 04, 2022

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2022 Nov 04, 2022

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 07, 2022 Nov 07, 2022

Copy link to clipboard

Copied

LATEST

To some extent, it may be worth giving Multi Find Change a try. That's $50 but it will save you so much time and trouble.

https://www.automatication.com/product/mfc/

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 07, 2022 Nov 07, 2022

Copy link to clipboard

Copied

> 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.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines