Article View: adobe.scripting.indesign
Article #18123Creating text on a new page
From: John Darnell
Date: Thu, 24 Apr 2003 17:54
Date: Thu, 24 Apr 2003 17:54
27 lines
1813 bytes
1813 bytes
I have the following code:
on MakeTextBox(BoxNum, TopCoord, LeftCoord, RightCoord, BottomCoord)
tell application "InDesign"
set CurDoc to active document
tell CurDoc
set PageCount to count of pages
-- Always working on the last page
-- If I use this number, or at
-- least, that's the theory.
tell page PageCount
make text frame with properties {geometric bounds: {TopCoord, LeftCoord, BottomCoord, RightCoord}, label:BoxNum}
end tell
end tell
end tell
end MakeTextBox
I use this at various points to create a text frame. The idea is that I create a page, put some text frames on it, then create a second page and put some text frames on it, etc.
If I create page 1, and then call this handler to create the text box, it works fine, but if I create page 2, then call this handler, it creates the second box on page 1 as if I am not using the index at all.
Anyone have any ideas about what I am doing wrong?
Technical Details
Message-ID:
<1de8dc77.-1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!129.250.35.142.MISMATCH!iad-feed.news.verio.net!iad-peer.news.verio.net!news.verio.net!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!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,5fb9b80ecb9e484c,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-04-24 11:08:05 PST From: "John Darnell" <John.Darnell@Walsworth.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!129.250.35.142.MISMATCH!iad-feed.news.verio.net!iad-peer.news.verio.net!news.verio.net!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: Creating text on a new page Message-ID: <1de8dc77.-1@WebX.la2eafNXanI> Date: Thu, 24 Apr 2003 10:54:06 -0700 Lines: 32 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit