Article View: adobe.scripting.indesign
Article #50[JS CS3] Getting Document of Grepsearch-Result
From: huksy
Date: Thu, 02 Apr 2009 07:48
Date: Thu, 02 Apr 2009 07:48
14 lines
1149 bytes
1149 bytes
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?
Thanks
H.
Technical Details
Message-ID:
<59b87a80.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!208.48.142.85!newsfeed.news2me.com!newshub.sdsu.edu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,aab8857f999a85e6,start X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: huksy@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!208.48.142.85!newsfeed.news2me.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: [JS CS3] Getting Document of Grepsearch-Result Message-ID: <59b87a80.-1@webcrossing.la2eafNXanI> Date: Thu, 2 Apr 2009 00:48:33 -0700 Lines: 13 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Original-Lines: 20