Thanks for the help, Nelson. I have a couple of questions for you, though.
<FIND BUTTON SCRIPT snipped>
> The repeat loops are practically the same.
Right - that's what I wanted to do.
> You need to ADD to gTextToSkip in the Find Again script.
It is added to when the offset is <> 0. I only need to add to it once
per operation.
> gTextToSkip needs to be reset in the Find Again script.
Let me know what you're thinking. I don't want to reset it outside of
the FIND button because I always want to find the next occurrence after
the previous found occurrence. In the single-card stacks, I could just
hit Find Again all the way to the end of the field.
> Not sure you need gChunk as a global.
I've cut out the colorizing and scrolling bits with rely on gChunk as
well as resetFoundText, which returns the highlighted text to its
original format.
> Take out the beeps if they're annoying, I used them to be sure things
> were working.
I do appreciate it, though now that I see your example, I'm ready to put
the dunce cap on for the day. <g>
Mary Bull
[EMAIL PROTECTED]
-----
> FIND AGAIN BUTTON SCRIPT:
> on mouseUp
> global gTextToFind,gTextToSkip,gChunk
> resetFoundText -- takes highlighting off
> repeat forever
> put offset(gTextToFind, fld "storyText",gTextToSkip) into tTextOffset
> if tTextOffset <> 0 then -- found it!
> beep
> put "char" && tTextOffset && "to" && tTextOffset + \
> length(gTextToFind) -1 && "of fld 1" into \
> gChunk -- for colorizing
> add tTextOffset + length(gTextToFind) - 1 to \
> gTextToSkip -- tells Find Again where to start
> # colorizing here
> # scroll the field
> exit mouseUp
> else
> if the number of this cd=the number of cds then exit repeat
> else
> put empty into gTextToSkip --reset for next cd search
> go next cd
> end if
> end if
> end repeat
> answer "Sorry, no more occurrences of the text were found."
> end mouseUp
>
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.