Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!n8emr!cmhgate!f200.n226.z1.FIDONET.ORG!Barry.Chern From: Barry.Chern@f200.n226.z1.FIDONET.ORG (Barry Chern) Newsgroups: comp.sys.mac.hypercard Subject: Re: Want find next button Message-ID: <26510.253D984C@cmhgate.FIDONET.ORG> Date: 17 Oct 89 22:43:51 GMT Sender: ufgate@cmhgate.FIDONET.ORG (newsout1.26) Organization: FidoNet node 1:226/200 - Aurora Borealis, Gahanna Oh Lines: 67 Tim Maroney writes: >Please be sure to let us know if you find a solution, other than Steven >Schrader's idea of going to the next card and searching again. (This >is probably adequate for your purposes, but not for mine; I'm searching >for text, not cards. If it appears twice on a card, I want to see >both, one after the other.) Well, I thought there must be an easy way to do this. I was wrong. Even if you select after the first find, it still goes back and finds it again. But I did come up with a work-around. If somebody else already had a cleaner way to do this, I'd like to be reminded of it. My version basically keeps track of how many finds you've done on the card. If you already found one instance, it does two finds, if you've found 2, it finds 3 times, etc. You'll notice that my "find" script has a line that says Find "D". this was just my test stuff, you'll have to get your find info in there somehow. You'll probably also want to add a lockscreen, so you don't see all those sequential finds taking place. Here's the scripts. Find button: (if you weren't using a button for your find, you don't need the globals. Just get the stuff to find into findWhat and put 2 into findNo at the beginning of the Find Next script.) on mouseUp global findWhat global foundlast global findNo put 1 into findNo put "d" into findWhat find findWhat put the foundchunk into foundlast add 1 to findNo end mouseUp Find Next button: on mouseUp global foundlast global findwhat global findNo put the id of this cd into thisCd select after foundlast repeat for findNo find findwhat end repeat put the foundchunk into foundlast if the id of this cd = thisCd then add 1 to findNo else put 2 into findNo end if end mouseUp Hope everyone tests this out and gets back to me with bugs and improvements. Barry. ** Origin : Aurora Borealis BBS - 614-471-6209 - 9600 HST - 1:226/200 ** -- Barry Chern via cmhGate - Net 226 fido<=>uucp gateway Col, OH UUCP: ...!osu-cis!n8emr!cmhgate!200!Barry.Chern INET: Barry.Chern@f200.n226.z1.FIDONET.ORG