🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #19578

Re: Finding the page/column of the end of a story

#19578
From: Greg Brunet
Date: Fri, 06 Dec 2002 16:18
23 lines
1929 bytes
This still eludes me - help please!

I went to the logic in the first message after trying a simpler set of code, namely:

    Set myTC = myStory.Characters(-1).TextColumns(0)



But as the story gets bigger, this can take a VERY long time (even a small story of about 35000 characters can take about 10 seconds to reference the Characters(-1) element, and I am working with stories with over 10x that many characters. That's why I went to using the TextColumns(-1) expression. If I have a valid myTC value, then

    Set myChar = myTC.Characters.Item(-1)

seems to run relatively quickly, and seems to be a MUCH faster way of getting a pointer to the last character of the story!

The problem is, sometimes myStory only contains TextColumn items for the actual columns that contain text, and sometimes it has items for ALL columns of all the linked pages - even when the text didn't fill all of the columns (or even all of the pages). When it returns the latter, then

    myStory.TextColumns.Item(-1)

returns an InsertionPoint instead of a TextColumn!

Any ideas on why this would act this way? Thanks,

-- Greg
Technical Details
Message-ID: <1de6d7df.0@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de6d7df.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,9ae4ae1d51167ae9
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2002-12-06 08:37:48 PST
From: "Greg Brunet" <gbrunet@sempersoft.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Finding the page/column of the end of a story
Message-ID: <1de6d7df.0@WebX.la2eafNXanI>
Date: Fri, 6 Dec 2002 08:18:01 -0800
References: <1de6d7df.-1@WebX.la2eafNXanI>
Lines: 25
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit