Article View: adobe.scripting.indesign
Article #14684rule above footnotes
From: Shane_Stanley
Date: Wed, 21 Jan 2004 09:48
Date: Wed, 21 Jan 2004 09:48
41 lines
2084 bytes
2084 bytes
Yes, that's possible. First, we need some way of identifying the right
frame. If you were starting from scratch, a label might make sense. We
could also identify it by, say, item 3 of its geometric bounds, or
where it sits, or even what layer it's on.
Let's assume, though, that it's the only -- or at least frontmost --
frame on each page to have its vertical alignment set to bottom
alignment. Let's also assume that we want the rule 1 pt, and 14 of
whatever vertical units you are using above the baseline of the first
line of text. Something like this should do the job:
tell application "InDesign CS"
tell document 1
-- get doc details
tell document preferences
set pageCount to pages per document
set pageWidth to page width
end tell
tell margin preferences
set leftMargin to left
set rightMargin to right
end tell
-- loop through pages
repeat with i from 1 to pageCount
-- get position of first character of the frame
tell (text frame 1 of page i whose vertical justification of text
frame preferences = bottom align)
set theBase to baseline of character 1
end tell
-- make rule
make graphic line at page i with properties {geometric
bounds:{theBase - 14, leftMargin, theBase - 14, pageWidth -
rightMargin}, stroke weight:1}
end repeat
end tell
end tell
--
Shane Stanley <sstanley@myriad-com.com.au>
Technical Details
Message-ID:
<FCD08A12-4BF6-11D8-B512-003065D61B90@myriad-com.com.au>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!newsfeed01.sul.t-online.de!t-online.de!webxShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,d8ba160e056982ca,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2004-01-21 02:07:38 PST From: Shane_Stanley@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: rule above footnotes Message-ID: <FCD08A12-4BF6-11D8-B512-003065D61B90@myriad-com.com.au> Date: Wed, 21 Jan 2004 01:48:38 -0800 Lines: 42 X-Mailer: Apple Mail (2.609) MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit