Thanks, that helps, I was being too ambitious I guess. At first I did not
think I wanted to do what you suggested, I only wanted to change part of
what I found (I thought it would replace the full "found" string). But when
I tried it, I understood that you were quite right, and it works great. I
first tried it with labels, but since I know the data, I realized that SKIP
would do me just as good.
This is what I ended up with, not pretty, but it works.
^!Find RPCS\.OHMM.*2-MHZ RS
^!Replace RPCS.OHMM RPCSHM.OHMM SIH
^!Find RPCS\.OHMM.*400-KHZ RS
^!IfTrue ^!Replace RPCS.OHMM RPCSLM.OHMM SIH
^!Find RACS\.OHMM.*2-MHZ RS
^!IfTrue ^!Replace RACS.OHMM RACSHM.OHMM SIH
^!Find RACS\.OHMM.*400-KHZ RS
^!IfTrue ^!Replace RACS.OHMM RPCSLM.OHMM SIH
(Sure, Jody did it in '78 and hsavage would do it in one line, but for me
this is progress!)
Mr. Phillip Sand Hansel II
----- Original Message -----
From: "Sheri" <silvermoonwoman@...>
Sent: Tuesday, December 05, 2006 2:30 PM
Subject: [Clip] Re: Find and IfTrue
> --- In firstname.lastname@example.org, "Mr. Phillip Sand Hansel II"
> <mr.phillip@...> wrote:
>> I can find it with this...
>> ^!Find RPCS\.OHMM.*2-MHZ R
>> if that is found, I would like to do this...
>> ^!Replace RPCS.OHMM RPCSHM.OHMM SIH
>> I thought I could do this....
>> ^!fTrue ^!Find RPCS\.OHMM.*2-MHZ R ^!Replace RPCS.OHMM RPCSHM.OHMM SIH
> You will need to take things one step at a time:
> ^!Find "whatever" RS
> ^!IfError FindErrorLabel
> ;if you get here whatever must be highlighted - your IfTrue condition
> ^!Replace "whateverhighlighted" >> "proper replacement" SIH
> ^!IfError ReplaceErrorLabel
> ;what next? Advance to next line?
> ^!Jump +1
> ;next find the next match?
> ^!Goto Start
> ;end of processing
> ^!Prompt There are no more "whatevers"
> ^!Goto End
> ^!Prompt I guess this should never happen.
> ^!Goto End
> ;end of clip
> Hope that helps.
> Fookes Software: http://www.fookes.us, http://www.fookes.com
> Fookes Software Mailing Lists: http://www.fookes.us/maillist.htm
> Yahoo! Groups Links