🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #18966

Re: Dealing with failed search

#18966
From: Dave Saunders
Date: Sun, 09 Feb 2003 14:02
20 lines
1242 bytes
As an update, I've discovered that after importing said four-page rtf file (I actually have 30-some to process), running:

search in myStory for "^p^p" replacing with "^p"

crashes ID 2 every time. So, it occurred to me that I could nonetheless do this:

repeat
 set myResult to search in myStory for "^p^p"
 try
  get myResult
 on error
  -- there weren't any
  exit repeat
 end try
 repeat with n from count of myResult to 1 by -1
  set contents of item n of myResult to return
 end repeat
end repeat

Dave
Technical Details
Message-ID: <1de79630.6@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de79630.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,d60260131d47ee93
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-02-09 06:08:09 PST
From: "Dave Saunders" <daves@pdsassoc.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Dealing with failed search
Message-ID: <1de79630.6@WebX.la2eafNXanI>
Date: Sun, 9 Feb 2003 06:02:33 -0800
References: <1de79630.-1@WebX.la2eafNXanI>
Lines: 22
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit