Article View: adobe.scripting.indesign
Article #9375Re: Working with text frames...
From: harbs
Date: Tue, 22 Aug 2006 17:09
Date: Tue, 22 Aug 2006 17:09
13 lines
1203 bytes
1203 bytes
Ole,
Why not look through the frames on the page and see if they belong to a story of a given ID? If they do, add them to an array
I tried this approach like this:
myStoryID = myStory.id;
for (i=0;i<doc.pages.length;i++){ myStoryFrames = new Array; for(var myCounter = 0; myCounter < doc.pages[i].textFrames.length; myCounter++){ myFrames = doc.pages[i].textFrames[myCounter]; if (myFrames.parentStory.id == myStoryID){ myStoryFrames.push(myFrames); } } }
The problem was it got the frames out of order. Is there an easy way to sort them so they are in the order of the story?
Thanks,
Harbs
Technical Details
Message-ID:
<3bc138b6.4@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.germany.com!news.ecp.fr!news.stben.net!webcrossingReferences:
<3bc138b6.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,319d2e63d27ba34a X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: harbs@adobeforums.com Newsgroups: adobe.scripting.indesign Subject: Re: Working with text frames... Message-ID: <3bc138b6.4@webcrossing.la2eafNXanI> Date: Tue, 22 Aug 2006 10:09:40 -0700 References: <3bc138b6.-1@webcrossing.la2eafNXanI> Lines: 24 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.germany.com!news.ecp.fr!news.stben.net!webcrossing