4 Replies Latest reply on Aug 10, 2012 5:38 AM by Muppet Mark

    Filter page items by property in Javascript


      What is the Javascript equivalent to this AppleScript?


      set xxx to every page item whose note = "John"


      After looking at some of the tutorials, I pieced this together. Is there a better way of doing this? With 30,000 path items it took over a minute to execute...


      docRef = app.activeDocument;


      var pathLength = docRef.pathItems.length;




      var hitList = []

      for (i = 0; i<pathLength; i++)



      if (docRef.pathItems[i].note= "John")