From: Skipper
Hi Gang,
I am still working on a macro that will find "search strings" over
spanning lines. My example of Find: Great Briton was not finding the
search string because it was on two separate lines. George came back
and stated that FindEOL() whould do the trick. Well, it did and it
didn't. Sometimes it would find it and other times it would not.
Therefore, I have set about to write my own macro. It isn't hard
because you are using the "or" function to conduct the search. My
problem is that I can't figure out how to check for the longest string
and have it automatically put the longest first.
Any suggestions using the following would be greatly appreciated:
snip===============================================================snip
string a1[25] = ""
string a2[25] = ""
proc Main()
ClrScr()
If Ask("First search string", a1)
UpdateDisplay()
ClrScr()
If Ask("Second search string", a2)
UpdateDisplay()
PushPosition()
If Not lFind("{"+a1+"}|{"+a2+"}", "+iwx")
Alarm()
PurgeMacro("mulstring")
else
KillPosition()
HiLiteFoundText()
Query(Beep)
Sound(500)
Delay(1)
NoSound()
endif
endif
endif
end
lFind("{"+a1+"}|{"+a2+"}", "+iwx")
snip===============================================================snip
Thanks in advance,
Skipper
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)
|