🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #20386

Re: Dave Saunders' Running Heads Script

#20386
From: Peter Boctor
Date: Sun, 28 Jul 2002 21:21
14 lines
1364 bytes
 when I'm trying to get the 1st word of the last para on the last frame, the script choked because there was an empty para right at the end. I put in a "try" so I could deal with one empty para, but I would like to put in a loop in case there are several empty paras.   

Jay, 

Instead of a "try" statement, you can use the "exists" event. Basically the events takes any object and will return true if the object exists and false if it doesn't exits. Here is an example: 

if (exists word 1 of myLastPara) then
     set myLastName to word 1 of myLastPara
else
     set myLastName to word 1 of paragraph -2 of myTextFrame
end if
 

-peter
Technical Details
Message-ID: <ef9de98.9@WebX.aaQKaf7vad4>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <ef9de98.-1@WebX.aaQKaf7vad4>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,37e35bfe49790ac7
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2002-07-28 14:42:37 PST
From: "Peter Boctor" <peter.boctor@adobe.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Dave Saunders' Running Heads Script
Message-ID: <ef9de98.9@WebX.aaQKaf7vad4>
Date: Sun, 28 Jul 2002 14:21:32 -0700
References: <ef9de98.-1@WebX.aaQKaf7vad4>
Lines: 16
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit