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

Script zum Entfernen von Seiten die einen bestimmten Textinhalt haben

New Here ,
Oct 26, 2018 Oct 26, 2018

Copy link to clipboard

Copied

Ich suche ein script für indesign mit dem man Seiten, auf denen sich ein bestimmter Text "XXX" befindet komplett aus dem Indesign Dokument gelöscht werden. 

Kann mir jemand helfen?

I'm looking for a script for indesign to completely delete pages containing a certain text "XXX" from the Indesign document. 

Can anyone help me?

TOPICS
Scripting

Views

573

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 ,
Oct 29, 2018 Oct 29, 2018

Copy link to clipboard

Copied

You can use the find change feature to get this done. The first step is to find the occurrence of the text "XXX" in the document and once that is found we would need to navigate to the page that holds this text and delete it. A rough code draft to do the same is given below, try it

app.findTextPreferences.findWhat = "XXX"

var contentList = app.activeDocument.findText()

for(var i = 0 ; i < contentList.length; i++)

{

     var parentPage = contentList.parentTextFrames[0].parentPage

     if(parentPage && parentPage.isValid)

          parentPage.remove()

}

app.findTextPreferences = NothingEnum.nothing;

-Manan

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
Community Expert ,
Oct 29, 2018 Oct 29, 2018

Copy link to clipboard

Copied

LATEST

Hi Manan,

Hans Haesler is already at it on hilfdirselbst.ch:

script seiten entfernen

gozreh | Oct 26, 2018

https://www.hilfdirselbst.ch/gforum/gforum.cgi?post=567167#567167

Regards,
Uwe

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
Community Expert ,
Oct 29, 2018 Oct 29, 2018

Copy link to clipboard

Copied

Hallo ahdesigner ,

ganz wichtige Frage:

Können sich auf den zu löschenden Seiten Textrahmen befinden, die mit anderen Textrahmen auf anderen Seiten verknüpft sind? Dann genügt es nicht, nur die Seite zu löschen, wenn die Textstelle gefunden wurde.

Sehr vereinfacht ausgedrückt:

Es müssten erst die Inhalte der Textrahmen gelöscht werden und dann darf die Seite gelöscht werden.

Noch eine wichtige Frage:
Was soll mit Doppelseiten passieren, bei denen eine der beiden Seiten gelöscht wird?
Soll die nächste Seite nachrutschen?

Gruß,
Uwe

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 ,
Oct 29, 2018 Oct 29, 2018

Copy link to clipboard

Copied

Hallo,

Danke für Deine Hilfe. Das Problem ist gelöst: https://www.hilfdirselbst.ch/gforum/gforum.cgi?post=567167#567167

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