Article View: adobe.scripting.indesign
Article #18049Re: Text Frames in AS
From: Jay Fraser
Date: Fri, 25 Apr 2003 16:38
Date: Fri, 25 Apr 2003 16:38
44 lines
1734 bytes
1734 bytes
This works for me --
tell application "InDesign 2.0.2"
set myBounds to {}
tell active document
repeat with i from 1 to (count text frames)
set myBounds to (geometric bounds of text frame i)
end repeat
end tell
end tell
The problem might be that you are talking to the wrong, er, entity. This only worked when I used "tell active document" not "active page" or "active spread."
Another odd thing is that I'm not sure a text frame is always a text frame until it has text in it. I had some issues there when I cut and pasted; I haven't confirmed that, though.
You can also add another loop in there so you can check each page:
tell application "InDesign 2.0.2"
set myBounds to {}
tell active document
repeat with j from 1 to (count pages)
repeat with i from 1 to (count text frames of page j)
set myBounds to myBounds & (geometric bounds of text frame i of page j)
end repeat
end repeat
end tell
end tell
Hope this helps.
Jay
Technical Details
Message-ID:
<1de8decd.1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de8decd.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,71981a4a2b57aadc X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-04-25 10:08:00 PST From: "Jay Fraser" <jayfraser@yahoo.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Text Frames in AS Message-ID: <1de8decd.1@WebX.la2eafNXanI> Date: Fri, 25 Apr 2003 09:38:18 -0700 References: <1de8decd.-1@WebX.la2eafNXanI> Lines: 41 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit