🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #2134

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

#2134
From: Ola_Khrapatin
Date: Mon, 05 Jan 2009 11:20
12 lines
3896 bytes
<div dir="rtl">Thank you, I&#39;ll check that one and post an update...<br><br>
<div><span class="gmail_quote">2009/1/4, Peter Kahrel &lt;<a href="mailto:member@adobeforums.com">member@adobeforums.com</a>&gt;:</span>
<blockquote class="gmail_quote" style="BORDER-RIGHT: #ccc 1px solid; PADDING-RIGHT: 1ex; PADDING-LEFT: 1ex; MARGIN: 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><span class="q">A new message was posted by Peter Kahrel in <br>
<br><b>InDesign Scripting</b> --<br>&nbsp;&nbsp;CS3 Javascript - finding the paragraph which contain the index page reference<br><br></span>
<blockquote><tt>myPara1Place = myPara1.parent.texts.itemByRange(0, myPara1.index) </tt></blockquote><br><br>myPara1.index returns the index of the first insertion point of the current paragraph within the story (myPara1.parent is a story), which could be in the thousands. But you&#39;re addressing probably just one text. It&#39;s as if you&#39;re asking for twenty lollies when there&#39;s just one in the jar. <br>
<br>When you use someobject.itemByRange (start, stop), &quot;stop&quot; must be smaller than (or equal to) the length of &quot;someobject&quot;. Since there are (probably) as many characters in a story as there are indexes, in this case that&#39;s what you use for itemByRange&#39;s scope. <br>

<div><span class="e" id="q_11ea18e2684e2070_2"><br>Peter <br><br>
<hr align="left" width="200">
View/reply at <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.adobeforums.com/webx?13@@.59b75803/16" target="_blank">CS3 Javascript - finding the paragraph which contain the index page reference</a><br>
Replies by email are OK.<br>Use the <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.adobeforums.com/webx?280@@.59b75803!folder=.eea52bc" target="_blank">unsubscribe</a> form to cancel your email subscription.<br>
<br></span></div></blockquote></div><br></div>
Technical Details
Message-ID: <23d69ac20901050320k15da38a9j9f4683eb1161c3cb@mail.gmail.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.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: Ola_Khrapatin@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: CS3 Javascript - finding the paragraph
 which contain the index page reference
Message-ID: <23d69ac20901050320k15da38a9j9f4683eb1161c3cb@mail.gmail.com>
Date: Mon, 5 Jan 2009 03:20:16 -0800
References: <59b75803.-1@webcrossing.la2eafNXanI>
Lines: 33
Received: from mail-bw0-f15.google.com [209.85.218.15] by adobeforums.com; Mon, 5 Jan 2009 03:20:48 -0800
Received: by bwz8 with SMTP id 8so21386053bwz.14
        for <adobe.scripting.indesign@adobeforums.com>; Mon, 05 Jan 2009 03:20:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:message-id:date:from:to
         :subject:in-reply-to:mime-version:content-type:references;
        bh=Hqd9516fPBARw6oyxCuxMsbJXCUyve8nYloAFzkHWAU=;
        b=YAOfDGW25nMkmn/UqcPBaoFJJ+mU2vVxd4lSK4e3/3XjO0VuRfDNibjZ//oKlRnyCZ
         GyqTu2BNrPc8bD42lfDqNj48MRoylQW2eLpwZp28TWvcpJ5mnCYO1tEYNcoCuWCiQ5v7
         HFb+lSFpRVhaGd3Yf6ftyxkEPvbj+UvkJvz+A=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=message-id:date:from:to:subject:in-reply-to:mime-version
         :content-type:references;
        b=hCCDP+mr7MPSgLpgw0UgBQkKje7fDV5Bt7CR3N38pWjdeCYTNApvxY/eGZmxBuTBvg
         5g4LsxVPjd0XpF1sf44p7YEW4ntIqHRIYCoXpIRsMr53o2UCnIx+MMiRYREnsaqeWZZ0
         NvvVQLRUvTPDtqd9Zt5jbSlksD/AHQR53qF28=
Received: by 10.103.171.20 with SMTP id y20mr7338399muo.19.1231154416442;
        Mon, 05 Jan 2009 03:20:16 -0800 (PST)
Received: by 10.103.94.8 with HTTP; Mon, 5 Jan 2009 03:20:16 -0800 (PST)
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit