Article View: adobe.scripting.indesign
Article #18084Re: Getting a list of text frames
From: John Darnell
Date: Mon, 28 Apr 2003 20:43
Date: Mon, 28 Apr 2003 20:43
44 lines
1942 bytes
1942 bytes
Ole: Here's the script as I cut-and-pasted it from Script Debugger: on CheckForText() local pagecnt local mypage local framecount, textlist, CurrentContents if length of my textbuf = 0 then return end if tell application "InDesign 2.0.1" activate tell active document set mypage to page 1 --pagecnt set textlist to every text frame of page mypage set framecount to count of items in textlist set thisCurrentFrame to item framecount in textlist set CurrentContents to text contents of thisCurrentFrame if length of CurrentContents = 0 then set contents of my thisCurrentFrame to textbuf else set CurrentContents to CurrentContents & my textbuf set contents of thisCurrentFrame to CurrentContents end if end tell end tell set my textbuf to "" end CheckForText I am testing this against a document that has a single page open in it with three unlinked text frames placed thereon, and each text frame has some miscellaneous text already placed in them. Just for kicks, I changed the code to read "text frames of mypage" and it still did not work. TIA.
Technical Details
Message-ID:
<1de8e8db.1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de8e8db.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,2c6a9a0526fb19e4 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-04-28 14:08:48 PST From: "John Darnell" <John.Darnell@Walsworth.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Getting a list of text frames Message-ID: <1de8e8db.1@WebX.la2eafNXanI> Date: Mon, 28 Apr 2003 13:43:27 -0700 References: <1de8e8db.-1@WebX.la2eafNXanI> Lines: 46 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit