🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #1575

Re: CS3 Javascript - finding the paragraph which contain the index page reference

#1575
From: Dave_Saunders
Date: Fri, 30 Jan 2009 20:52
7 lines
1080 bytes
What you're getting is correct. All text objects return as their index property the index of the first insertion point within the text object relative to the start of the story. If you want the count of lines in the story up to and including the first line of result(1) use (JS):

myStory = result(1).parent; 
myLine = result(1).lines[0]; 
lineCount = myStory.characters.itemByRange(0,myLine.index).texts[0].lines.length;

Dave
Technical Details
Message-ID: <59b75803.22@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing
References: <59b75803.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,4423827cf06ba747
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Dave_Saunders@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: CS3 Javascript - finding the paragraph
 which contain the index page reference
Message-ID: <59b75803.22@webcrossing.la2eafNXanI>
Date: Fri, 30 Jan 2009 12:52:04 -0800
References: <59b75803.-1@webcrossing.la2eafNXanI>
Lines: 8
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit