2 Replies Latest reply on Jun 11, 2012 5:57 AM by BenCloutier

    Extract content by targetting script labels

    BenCloutier Level 1



      i have a flyer with text boxes that have a unique script labels info. Each product boxes (description, price, photo, etc) have a script label with the product skew, what kind of info it contains and the zone (12345678.desc.C1, 12345678.price.C1, 12345678.photo.C1).


      Screen shot 2012-06-08 at 14.23.12.png


      Is there a way to script something to get those informations, sorted by product, into a text box of text file?

      Can someone tell me yes or no and point me in the right direction please?


      Here is what i would need:

      12345678.desc content
      Title bla bla bla
      Description bla bla bla


      12345678.price content



      12345678.photo content






        • 1. Re: Extract content by targetting script labels
          Dave Saunders Level 4

          Have you ever written a script? Which language(s) are you familiar with? Which one do you want to use?


          In JavaScript you can do something like:


          myDoc = app.documents[0];

          myPIs = myDoc.allPageItems;

          for (var j = myPIs.length - 1; j >= 0; j--) {

            if (myPIs[j].label != "") {

               // process this label





          • 2. Re: Extract content by targetting script labels
            BenCloutier Level 1

            Hi Dave, yes, i have played (in another life) with GW Basics and Macromedia Directors's Lingo and now i work with Javascript for maybe a year now, but not full time. I have learned it by myself on my spare time. Most of my script turn around grep search, creating/applying Styles, Arrays and variables and i want to expand my knowledge. I am trying new things one at a time. People here have been of much help in my learning process. I will try your script and try to complete it.


            Thanks alot