Skip to main content
Mohammad Modassir
Inspiring
May 8, 2016
Answered

Javascript-syntax (in Indesign CC 2015)

  • May 8, 2016
  • 2 replies
  • 785 views

Hi,

What are the syntax using “FindChangeByList” for:

“Search for all Arial Italic Letters “b” (with taking into account the Case Sensitivity of the letters) and change to so and so using same font, Arial Italic...”

“Search for all Arial Italic Characters “¤” (with taking into account the Case Sensitivity of the letters) and change to so and so using same font, Arial Italic...”

?

I would appreciate your help.

Regards, Mohammad Modassir

This topic has been closed for replies.
Correct answer tpk1982

You are good! ...I forgot “CaseSensitivity”... how would it be this included?


Add caseSensitive:true to the list

grep {findWhat:"x", appliedFont:"Arial", fontStyle:"Italic"} {changeTo:"xx", appliedFont:"Arial", fontStyle:"Italic"} {caseSensitive:true, includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}

2 replies

tpk1982
Legend
May 9, 2016

try this

app.findTextPreferences = null;     app.changeTextPreferences = null;

app.findChangeTextOptions.caseSensitive = true;   

app.findTextPreferences.appliedFont  = "Arial\tItalic";

app.findTextPreferences.findWhat="b";

app.changeTextPreferences.changeTo  = "x"; //change here whatever you want

app.changeText();

app.findTextPreferences = null;     app.changeTextPreferences = null;

app.findChangeTextOptions.caseSensitive = true;   

app.findTextPreferences.appliedFont  = "Arial\tItalic";

app.findTextPreferences.findWhat="¤";

app.changeTextPreferences.changeTo  = "xxx"; //change here whatever you want

app.changeText();

Karthi

Mohammad Modassir
Inspiring
May 9, 2016

tpk1982​​, I only want to use Notepad and looking for something like this:

text{findWhat:"xx"}{changeTo:"x"}{includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}

Im using the feature in Indesign CC 2015;

FindChangeList.txt

And I want to add such a code-line to the already given samples in the FindChangeList.txt notepad which came with the Indesign CC.

tpk1982
Legend
May 10, 2016

try this,

grep {findWhat:"x", appliedFont:"Arial", fontStyle:"Italic"} {changeTo:"xx", appliedFont:"Arial", fontStyle:"Italic"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}

am not sure why you created another thread for the same question in forum..

Peter Spier
Community Expert
Community Expert
May 8, 2016

Moved to the scripting forum...