Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!nrl-cmf!cmcl2!beta!unm-la!unmvax!charon!cs2531as From: cs2531as@charon.unm.edu (Andrew Stone) Newsgroups: comp.sys.mac.hypercard Subject: Re: Searching a stack and creating a list of matching cards... Message-ID: <3022@charon.unm.edu> Date: 5 May 88 21:21:43 GMT Reply-To: cs2531as@unmc.UUCP (Andrew Stone) Organization: University of New Mexico, Albuquerque, NM Lines: 36 In a recent article the following Grep script was suggested, I've added the few lines which "fix" the known limitation: >Try this script in a button: >on mouseUp > push card -- save the current card > ask "Grep for what" -- what do you want to grep for? > put empty into cardList -- start with no cards in list domenu "New Card" put it into field whateveryourfieldsareNamed > find it -- find 1st occurence of text > put the id of this card into startCard -- save it to test for end of list > repeat > put the id of this card & return after cardList -- add this card to list > find it -- find the next card > if the id of this card is startCard then exit repeat -- are we done? > end repeat domenu "Cut Card" -- cut the dummy card which was the first find put empty into line 1 of cardlist -- remove the ocurrence of this find > > pop card -- back to original card > put cardList into card field "grep list" -- display the list >end mouseUp. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | Andrew Stone GEnie:ASTONE 505-345-4800 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cs2531as@charon.unm.edu ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | "Science is a fable made consistent" - Edward Teller | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^