1 Reply Latest reply on Jun 10, 2011 12:29 AM by c.pfaffenbichler

    Keyword loop

    Clevadio Level 1

      I wish to be able to create a loop that will look at the keywords of all open documents and based on those keywords run an action. I can get the script to run an action based on the metadata I just don't know how to create the loop. Please help me.

        • 1. Re: Keyword loop
          c.pfaffenbichler Level 9

          Something like this might work:


          var theDocs = new Array;
          for (var m = 0; m < app.documents.length; m++) {
          for (var n = 0; n < app.documents.length; n++) {
          app.activeDocument = theDocs[n];
          // insert your operation here;


          The double for-clause is just a precaution in case your Script opens, creates or closes documents which might get confusing if one clause were to handle it all.