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

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

LEGEND ,
Oct 04, 2023 Oct 04, 2023

This is the query:

RobertTkaczyk_2-1696448454726.png

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

RobertTkaczyk_1-1696503640507.png

 

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

RobertTkaczyk_0-1696503624750.png

 

 

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,-"??

 

TOPICS
Scripting
271
Translate
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
LEGEND ,
Oct 04, 2023 Oct 04, 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:

RobertTkaczyk_1-1696449485672.png

it works as expected:

RobertTkaczyk_2-1696449681375.png

 

but if run like this:

RobertTkaczyk_3-1696449851713.png

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 ?

 

Translate
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
LEGEND ,
Oct 12, 2023 Oct 12, 2023

Can someone please check if JS is working OK? TIA 

 

Translate
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 ,
Dec 26, 2024 Dec 26, 2024
LATEST

Hi.

More than a year later... I have posted that My GREP with style restriction does not work in InDesign server.

Your problem could be maybe related to mine. I have not yet a solution but reading the stored GREP and executing as script.

If you have another solution, please let us know.

Translate
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