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

Identfiy duplicate paragraphs using Indesign scripting

New Here ,
Sep 14, 2016 Sep 14, 2016

Copy link to clipboard

Copied

Is it posssible loop through all the paragraphs in InDesign and highlight the paragraphs that are repeated using InDesign Scripting?

TOPICS
Scripting

Views

433

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
Enthusiast ,
Sep 15, 2016 Sep 15, 2016

Copy link to clipboard

Copied

Yes, this is possible!

Votes

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
New Here ,
Sep 15, 2016 Sep 15, 2016

Copy link to clipboard

Copied

how do you scan through the document to find it

Votes

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
Enthusiast ,
Sep 15, 2016 Sep 15, 2016

Copy link to clipboard

Copied

1. Loop through all paras

2. Store the current para

3. Loop again in a inner loop through all paras and compare the content of the paras with the current para content

4. Maybe a bit finetunung:

a) Check, if the index of the compared Para != the current para

b) Create a new list, push a found and check if a found is already in the list

c) include some counters to show you, how many founds you have

Good luck.

Edit: If you try to find only preceeded ones, then there is only one loop needed, as Loic described! If you try to find multiples on different places, you may need two loops.

Votes

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
People's Champ ,
Sep 15, 2016 Sep 15, 2016

Copy link to clipboard

Copied

Hi,

Here is what you need to do :

1. Reference the document you want to work with

2. Reference every single paragraphs that belong to that document

3. Loop through them and see if the contents equals the preceeding one

4. Highlight it.

So now it's up to you to get at the forum (search) a/o docs to pass through the listed points. We will the n happy to provide more help.

Loic

Votes

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
New Here ,
Sep 15, 2016 Sep 15, 2016

Copy link to clipboard

Copied

LATEST

The duplicate paragraph can be anywhere in the document need not be the precedng one or succeeding one

Votes

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