1 Reply Latest reply on Jan 13, 2011 2:57 AM by getZinger

    Deleting imageFrames

    Joris Dick

      I'm new to Javascripting, and I have troubles scripting the following issue.

       

      In my Indesign doc I have several imageboxes whoom contain logo's.

      All these boxes have a specific Scriptlabel (ex. Logo1, Logo2, etc.).

      There is also an XML file loaded into this document. In this XML there is a list witch contains the scriptlabels of these logo's.

       

      When for exemple Logo1 isn't in the XML the script should delete the ImageFrame with scriptlabel Logo1.

       

      Thx for feedback

        • 1. Re: Deleting imageFrames
          getZinger

          Can you give an example of how the scriptlabel is stored in the xml?

           

          if they are all stored  in 1 parent element, you can collect them in a single array by looping through the elements childs, join the array, and loop through all page items and check the label with the joined array.

          ie. if(yourscriptlabel.match(yourjoinedarray)!=null){

          //do something

          }