🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #8620

Re: Get (relative) index of a paragraph inside a selection of paragraphs

#8620
From: Robert Tkaczyk
Date: Sun, 01 Oct 2006 10:57
24 lines
1707 bytes
> But how could I find out the index of this paragraph within the selected paragraphs to start the second loop at this index? (Is it the second, the third, the fourth or another paragraph of the selection?)

you need to write your own procedure - here is VB example ;)

Function ReturnParaIndex( _
	myLastPara As Long, _
	myCharacter As InDesign.Character) As Long
     Dim a As Long

     For a = myLastPara To myStory.Paragraphs.Count
         If myCharacter.Index = myStory.Paragraphs.Item(a).Index Then
             ReturnParaIndex = a
             Exit For
         End If
     Next a
End Function

of course - you can past as second parameter Index of character ;)
and myStory could be as third parameter, too ;)

robin

-- 
www.adobescripts.com
Technical Details
Message-ID: <3C37787F2DB7F85D8CA7A5CA9020CF6F@in.webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!news.albasani.net!news.isoc.lu!webcrossing
References: <3bc1d60c.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,11f901afe18132ac
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Robert Tkaczyk <indesignscripts@wp.pl>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!news.albasani.net!news.isoc.lu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: Get (relative) index of a paragraph
 inside a selection of paragraphs
Message-ID: <3C37787F2DB7F85D8CA7A5CA9020CF6F@in.webcrossing.la2eafNXanI>
Date: Sun, 1 Oct 2006 03:57:33 -0700
References: <3bc1d60c.-1@webcrossing.la2eafNXanI>
Lines: 26
User-Agent: Thunderbird 1.5.0.7 (Windows/20060909)
X-Antivirus: avast! (VPS 0639-4, 2006-09-29), Outbound message
X-Antivirus-Status: Clean
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit