repeated find commands

Scott Allen allens at uleth.ca
Wed Jan 29 12:19:01 EST 2003


Hi all,
I'm trying to use the "find" command within a loop to repeatedly find 
pieces of text in a card field.  The problem I'm having is that the 
second and subsequent times the find command is implemented, it will 
only find the text it is seeking if the text occurs _after_ the text it 
found last time.  For example, in an alphabetical list:
aardvark
alpha
bravo
charlie

if I search for "bravo" first, it will be able to find "charlie" on the 
next iteration of the loop but not "alpha".  It is like it is doing a 
"find again" rather than a "find" in the way that many word-processors 
work but without wrapping around to the beginning of the field again.

After failing to find "alpha" in the previous scenario, it will be able 
to find anything in the field (even aardvark) because (i presume) in 
failing to find alpha, it has lost the position of its last successful 
find.

The find command doesn't appear to affect "the selection" and setting 
either "the foundline" or "the foundtext" to empty simply deletes those 
  pieces of information from the field (not what I want).

I'm using a workaround where before each use of "find" that I actually 
care about, I go and find "X" in a separate field that contains only an 
"X" which allows me to then find anything anywhere in the field that I 
want.

However, there must be a more elegant way to reset the status of the 
"find" command so that it will find text anywhere within the field.  
Could someone please illuminate me?

Thanks

Scott Allen
Dept. of Psychology and Neuroscience
The University of Lethbridge
allens at uleth.ca




More information about the metacard mailing list