Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!uflorida!mephisto!mcnc!ecsvax.uncecs.edu!dlugose From: dlugose@uncecs.edu (Dan Dlugose) Newsgroups: comp.sys.mac.hypercard Subject: Re: find command - 2 questions Message-ID: <1990Jan4.202141.3812@uncecs.edu> Date: 4 Jan 90 20:21:41 GMT References: <5026@tekred.CNA.TEK.COM> Distribution: na Organization: UNC Educational Computing Service Lines: 23 In article <5026@tekred.CNA.TEK.COM> matth@kink.CNA.TEK.COM (Matt Harcourt) writes: >When using the find command, is it possible (within the script) to >determine where the text that was found is located? For instance, if >I'm searching a particular field for the occurance of some text I can >tell if the next occurance appears on a different card or background, >but can I determine if the next occurance found is before/after the >previous occurance found if both are on the same card? What I'm >trying to do is detect when the find "wraps" around to the first >occurance of some text on a card which contains multiple occurances >(and the only occurances) of the text. > I use a script for replacing strings only on the card I'm looking at. The meat of it is: put the name of this card into startc repeat find targ in field x if the foundfield is not empty then if "bkgnd field 1" is the foundfield then if startc = the name of this card Dan Dlugose UNC Educational Computing Service