Article View: adobe.scripting.indesign
Article #20852Re: list all overset text frames??
From: Shane Stanley
Date: Sun, 02 Jun 2002 07:14
Date: Sun, 02 Jun 2002 07:14
54 lines
2480 bytes
2480 bytes
in article ef8e037.-1@WebX.aaQKaf7vad4, peter long wrote:
> has any one written an applescript that just lists the pages that contain an
> overset text frame
You could try something like this:
tell application "InDesign 2.0.1"
tell document 1
-- following should return {} where overset
set theFrames to parent text frame of character -1 of stories
set thePages to ""
set theSpreads to ""
repeat with i from 1 to count of theFrames
if item i of theFrames = {} then
-- get last frame of story
set theObject to end text frame of parent text frame of character 1 of
story i
-- find spread or page of story
set theclass to nothing
repeat
if theclass = page then
set thePages to thePages & (document offset of theObject) & ", "
exit repeat
else if theclass = spread then
-- spread lacks index property
set theSpreads to theSpreads & (document offset of page 1 of
theObject) & ", "
exit repeat
else
set theObject to parent of theObject
set theclass to class of theObject
end if
end repeat
end if
end repeat
end tell
activate
if thePages = "" then
display dialog "No overset stories."
else if theSpreads = "" then
display dialog "Overset items are on page(s) " & (text 1 thru -3 of
thePages) & "."
else
display dialog "Overset items are on page(s) " & thePages & "and on the
pasteboard of page(s) " & (text 1 thru -3 of theSpreads) & "."
end if
end tell
You'll probably have to check tables separately.
--
Shane Stanley, sstanley@myriad-com.com.au
Technical Details
Message-ID:
<B92002D9.31BC3%sstanley@myriad-com.com.au>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!supernews.com!telocity-west!TELOCITY!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<ef8e037.-1@WebX.aaQKaf7vad4>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,eca6aaad1384c6e8 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2002-06-02 00:37:25 PST From: Shane Stanley <sstanley@myriad-com.com.au> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!supernews.com!telocity-west!TELOCITY!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: list all overset text frames?? Message-ID: <B92002D9.31BC3%sstanley@myriad-com.com.au> Date: Sun, 2 Jun 2002 00:14:02 -0700 References: <ef8e037.-1@WebX.aaQKaf7vad4> Lines: 58 User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.0.3 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit