Skip to main content
Robert at ID-Tasker
Legend
October 4, 2023
Question

Different GREP search result via scripting than in InDesign UI ??

  • October 4, 2023
  • 1 reply
  • 272 views

This is the query:

and in UI it will find this - which is what I'm looking for:

 

but through scripting - it will also include the graphics below, from the next paragraph - that is also styled with "R-cena"...

 

 

What am I doing wrong ?

 

I've added ^...$ in the hope, that it will find only single line texts - but it still includes EVERYTHING after the "281,-"??

 

This topic has been closed for replies.

1 reply

Robert at ID-Tasker
Legend
October 4, 2023

Looks like something is wrong with:

 

Call myInDi.LoadFindChangeQuery(myLQueryName, idSearchModes.idGrepSearch)

 

Because, if I enter the GREP query as a parameter for the GREP Search:

it works as expected:

 

but if run like this:

will return wrong results...

 

Yes - this query is slightly different than before - (...) instead of  ^...$ - but it works when I execute search from script with this query - but returns wrong results when I try to load it as a saved query...

 

Can someone check if JavaScript works correctly ?

 

Robert at ID-Tasker
Legend
October 12, 2023

Can someone please check if JS is working OK? TIA