Re: Selecting and deleting portions of files
- Hello hugo_paulissen,
Friday, April 25, 2003, 1:19:54 PM, you wrote:
h> Alan, Mark,
h> Apparently the reason why my clip didn't work had to do with the
h> original mail being treated by Yahoo/the web. I have a slightly
h> different clip that should do what Mark wants it to do. (changed the
h> regular expressions and searches a little further now, since the text
h> Mark provided us with now was different from the first post..
h> Look out for long lines (like the one with ===etc)
h> ;^!SetDebug ON
h> ^!Jump 1
h> ^!Set %output%=""
h> ^!Find "\s+-+\n.+\n\s+-+" RS
h> ^!IfError END
h> ^!Jump -1
h> ^!Set %startSelection%=^$GetRow$:^$GetCol$
h> ^!Find "^-+$" RS
h> ^!Jump Select_END
h> ^!SelectTo ^%startSelection%
h> ^!Set %kriq%=^$StrReplace("-";"";^$GetSelection$;0;0)$
h> ^!Jump Select_END
h> ^!Set %output%=^%output%^%NL%^%NL%=====================^%NL%^%NL%^%kriq%
h> ^!GoTo LOOP
h> ;I just delete the old file here; adapt to suit your own needs...
h> ^!Menu Edit/Clear All
I still had a problem with this. As I explained before my setup was the
The Bat! receives the message and appends it to a file named kriq.txt.
Then I manually removed what had to be removed. New messages were being
appended on a (work)daily basis.
When I apply the above clip to Kriq.txt I am stuck with the result of the
transformation. That is: only that part of Kriq.txt (at the end of the file)
that contained the newly appended messages was being treated and "remembered"
by this clip. All the earlier results simply were not being copied, and thus
would have been lost forever.
This seems the easiest way out to me: I have changed the last line of code
^!AppendToFile "D:\Program Files\The Bat\MAIL\Kriqs.txt" ^%output%
So now I end up with an empty Kriq.txt, ready to receive the next messages,
and a Kriqs.txt containing (and adding up) all the earlier results.
Thanks again for your help.
using The Bat! 1.63 Beta/7
- Hi Mark,
> I still had a problem with this. As I explained before my setup wasthe
> This seems the easiest way out to me: I have changed the last lineof code
>Great you found out how to place something at the end of the current
> ^!AppendToFile "D:\Program Files\The Bat\MAIL\Kriqs.txt" ^%output%
file (the clip showed that you had to do something with the last