Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!mdisea!gilbert From: gilbert@MDI.COM (John Gilbert) Newsgroups: comp.sys.mac.hypercard Subject: Re: Finding Text Message-ID: <1991May2.165951.8135@MDI.COM> Date: 2 May 91 16:59:51 GMT References: <284.2819CAE4@mcws.fidonet.org> <1991May1.151453.14818@oz.plymouth.edu> Sender: news@MDI.COM Organization: Motorola, Mobile Data Division - Seattle, WA Lines: 50 In article <1991May1.151453.14818@oz.plymouth.edu> oddjob@oz.plymouth.edu (Andrew C. Stoffel) writes: > >Find doesn't SEEM to work from a script .... There are some subtle aspects to using find that I think I have reasoned out by experimentation. I had similar problems to what you described. The bottom line centers around the find text remaining hilited. If you do a find, and move to a card, the found text will be selected. If you are doing this from within a script, it will work, but if you do anything else in the script prior to issuing your next find that causes the found text to no longer be "selected", then a subsequent find will find the same text again. The find operation is designed to find each occurance of something, including the "next" occurance on a card. The currently selected text on a card is a cursor of sorts, indicating where the next search will begin from (how you percieve what fields are next or previous, or at all serial may be a trick, perhaps it is handled by field number sequence??). If nothing is selected, it seems to start at the beginning of the card. What I did in situations like you described, situations that involve identifying cards with ANY occurance (one or more) of the text I was looking for, was to do something like: on foo repeat find "meaning of life" -- -- do all kinds of stuff -- go next card end repeat end foo Find works, and quite logically. But there are some things that you may not always consider. Most of the time I want to use it to find cards. But there may be cases where I may want to find each instance of text on a card. I have even been fooled by it finding text in hidden fields. Now that 2.0 offers the "don't search" property, that can be fixed in some cases. You should really check into the used of the mark all cards with... functionality, as it may provide an even better solution. John Gilbert -- John Gilbert gilbert@MDI.COM ..!uunet!mdisea!gilbert