4 Replies Latest reply on Apr 2, 2009 7:01 AM by (huksy)

    [JS CS3] Getting Document of Grepsearch-Result

      Hi there,

      I'm doing a grep-search about all open documents by script. The results are saved by an array:

      myGrepText = app.findGrep(true);

      Afterwards I loop all results and I need to know in which document the individual result is. This code works so far:

      for (var i = 0; i < myGrepText.length; i++ ) {
      var myDoc = myGrepText[i].parent.insertionPoints[0].parentStory.parent;

      My Question: Isn't there a better way to get the analog document?