Re: A useful macro that I thought I'd share.

2001-11-18 Thread Januk Aggarwal

Hi Allie,

An archeological dig discovered that on Sunday, November 18, 2001 at
18:44 GMT -0500, Allie C Martin [AM] typed the following:

AM %IF:%SETPATTREGEXP=(?m-s)^X-Mailer\:.*(Bat!).*$%-
AM %REGEXPMATCH=%HEADERS=Bat!:I:%-
AM %IF:'%SETPATTREGEXP=(?m-s)^X-Mailer\:.*(Becky).*$%-
AM %REGEXPMATCH=%HEADERS'='Becky':'I':'NONE'

Why not simplify it a bit?  Try:

%IF:%SETPATTREGEXP=(?im-s)^X-Mailer\:.*(Bat!|Becky).*$%-
%REGEXPBLINDMATCH=%HEADERS%-
%SUBPATT=1=:NONE:I


-- 
Thanks for writing,
 Januk Aggarwal

Using The Bat! 1.54/10 under Windows 98 4.10 Build  A

Personal Plan:  To avoid sanity, lucidity and wit at all costs.


-- 
__
Archives   : http://tbtech.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]




Re: A useful macro that I thought I'd share.

2001-11-18 Thread Allie C Martin

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

@ 16:13:25 -0800 [ Sun, 18 Nov 2001], Januk Aggarwal [JA] thoughtfully
wrote the following:
...
JA Why not simplify it a bit?  Try:

JA %IF:%SETPATTREGEXP=(?im-s)^X-Mailer\:.*(Bat!|Becky).*$%-
JA %REGEXPBLINDMATCH=%HEADERS%-
JA %SUBPATT=1=:NONE:I

Yes, this works. :-)

- --
©Allie C Martin  --  List Moderator and fellow end-user
 PGPKey - mailto:[EMAIL PROTECTED]?Subject=PGPPubKey1
 [MUA: TB! v1.54/10  (*)  OS: Win2K SP 2]
__
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (MingW32)
Comment: Sealed for Security

iEYEARECAAYFAjv4WdUACgkQV8nrYCsHF+LwoACgwzWmmLyPWt1UISZjSho6Dn/Z
KxAAoPuiLIHGwBrcFzdbyxV6XDDuh07P
=X6sv
-END PGP SIGNATURE-



-- 
__
Archives   : http://tbtech.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]




Update Questions (was: Boxquotes à la KorrNews and new quotestyle)

2001-11-18 Thread Carsten Thönges

Hi list, hi RexExp experts,

 I really like the boxquotes[tm] of KorrNews and I was wondering if it
 is possible to implement such a feature in TB! using QTs and Macros.

[...]

Thank you for the positive feedback!

I simplified the QTs a little and added some REMs. Now it is easier to
read the QTs and modify them for your special purposes.

But I also have some questions. Maybe you guys can help me ;-)

What is the maximum size of an string to store in the %COMMENT macro?
I experienced that 200 lines are processed in about 1 sec. on my
P3-700 notebook. But including a boxquote from a file with 2887 lines
and 43305 characters lead to an CPU usage of 99% for 3-4 minutes until
I killed TB! via Task Manager :-( You should not process such large
files, but why should you?

Is there a maximum number of recursive QTs calls allowed?

Here are the modified QTs. Use them like I described in my first Mail.
Enjoy...

--==[ QT: bq ]--
,- [  ]
%REM=_Copy clipboard into comment_%-
%COMMENT='%clipboard'%-
%-
%REM=_Does comment end with line break?_%-
%REM=_If no: add line break_%-
%IF:%-
%-
%SETPATTREGEXP='(?is).*[\n]\z'%-
%REGEXPMATCH='%COMMENT'=%-
:%-
%COMMENT='%COMMENT
'%-
%-
%REM=_Call the bq2 template_%-
%QINCLUDE=bq2%-
'-
----

=-=-[ QT: bqf ]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
,- [ %clipboard ]
%REM=_Insert file (name in clipboard) into _%-
%REM=_comment._%-
%REM=_Call QT_%-
%-
%COMMENT='%put=%clipboard
'%-
%QINCLUDE=bq2%-
'-
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

--==[ QT: nq ]--
%REM=_Cut out part before '^-- $'_%-
%REM=_and insert it into comment_%-
%REM=_Call QT_%-
%-
%COMMENT=%-
%SETPATTREGEXP='(?ism)[\n]*(.*?)[\n]*((-- [\n])|\z)'%-
%REGEXPBLINDMATCH='%text'%-
%SUBPATT='1'%-
%QINCLUDE=bq2
----

=-=-[ QT: bq2 ]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
%REM=_Does comment have two or more lines?_%-
%REM=_If yes: print | and the first line_%-
%REM=_cut this line out of comment_%-
%REM=_and call this QT again_%-
%REM=_If no:  print | and the last line and exit_%-
%-
%IF:%-
%-
%SETPATTREGEXP='(?is).*?[\n](.*)'%-
%REGEXPMATCH='%COMMENT'xx%-
:%-
%SETPATTREGEXP='(?is)(.*?)[\n]'%-
| %REGEXPMATCH='%COMMENT'
%-
%COMMENT='%-
%SETPATTREGEXP=(?is).*?[\n](.*)%-
%REGEXPMATCH=_%COMMENT_'%-
%QINCLUDE='bq2'%-
:%-
| %COMMENT%COMMENT=''%-
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Please report bugs to me or the list. Thanks.

-- 
Best regards, Carsten

The Bat! (v1.54/10e) Business
Windows NT 5.0 (Build 2195) Service Pack 2


-- 
__
Archives   : http://tbtech.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]




Re: Update Questions (was: Boxquotes à la KorrNews and new quotestyle)

2001-11-18 Thread Allie C Martin

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

@ 02:02:30 +0100 [ Mon, 19 Nov 2001], Carsten Thönges [CT] wrote these
words of wisdom:
...
CT ,- [  ]
CT %REM=_Copy clipboard into comment_%-
CT %COMMENT='%clipboard'%-
CT %-
CT %REM=_Does comment end with line break?_%-
CT %REM=_If no: add line break_%-
CT %IF:%-
CT %-
CT %SETPATTREGEXP='(?is).*[\n]\z'%-
CT %REGEXPMATCH='%COMMENT'=%-
CT :%-
CT %COMMENT='%COMMENT
CT '%-
CT %-
CT %REM=_Call the bq2 template_%-
CT %QINCLUDE=bq2%-
CT '-

This one is great but I had to change the last two lines of the
template to:

- --
%Qinclude=bq2

'-
- --

I had to remove the '%-' and insert the extra return or else the final
'- didn't start in a new line after the quoted material.

What a powerful client this is.. vbg

- --
©Allie C Martin  --  List Moderator and fellow end-user
 PGPKey - mailto:[EMAIL PROTECTED]?Subject=PGPPubKey1
 [MUA: TB! v1.54/10  (*)  OS: Win2K SP 2]
__
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (MingW32)
Comment: Sealed for Security

iEYEARECAAYFAjv4YD0ACgkQV8nrYCsHF+K9KwCg/XC76iXyJS1p1us9m/DFfJWP
qQMAoK4vNyzAV8oFhYbfZNqtp7OuTyRM
=dwTx
-END PGP SIGNATURE-



-- 
__
Archives   : http://tbtech.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]




Re: Update Questions

2001-11-18 Thread Allie C Martin

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

@ 03:30:45 +0100 [ Mon, 19 Nov 2001], Carsten Thönges [CT]
thoughtfully wrote the following:
...
CT I'm using 1.54/10e. You use 1.54/10. Could there be differences?

I changed to the 10e beta and this is what I get with your template as
is.

,- snip --
| I'm using 1.54/10e. You use 1.54/10. Could there be differences?
|
| Who else has these problems?'- snip --

When I make the changes I mentioned, this is what I now get.

,- snip --
| I'm using 1.54/10e. You use 1.54/10. Could there be differences?
|
| Who else has these problems?
'- snip --

The difference persists.

The editor behaves so strangely in this beta that I have to revert
back to beta 10.

- --
©Allie C Martin  --  List Moderator and fellow end-user
 PGPKey - mailto:[EMAIL PROTECTED]?Subject=PGPPubKey1
 [MUA: TB! v1.54/10e  (*)  OS: Win2K SP 2]
__
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (MingW32)
Comment: Sealed for Security

iEUEARECAAYFAjv4dZIACgkQV8nrYCsHF+IK8QCcDEnE6rG5/Kma/1hPTfxRLp4Q
E/kAljtse08rxrXOR0RLGZRWUxsBq7U=
=3mQV
-END PGP SIGNATURE-



-- 
__
Archives   : http://tbtech.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]




Re: A useful macro that I thought I'd share.

2001-11-18 Thread Lars Geiger

Hi Allie,
On Monday, November 19, 2001 at 20:06:07 [GMT -0500], you wrote:

ACM Very similar to Januk's but it's missing the %Subpatt macro so it
ACM doesn't work.

H, interesting, you're right. It seems it was a bit late last
night.

Anyway, I just tried to track down the mistake in my logic and I just
seem to be unable to see the point. IIRC, %SETPATTREGEXP defines a
pattern and %REGEXPMATCH will return the first matched subpattern.

But if I test the following QT (in a reply, of course) it outputs an
error *** Error: range out of order in character class ***


,-  [ QT test ]
| %SETPATTREGEXP=(?m-s)^[X-Mailer|User-Agent]\:.*(Bat!|Becky|Gnus).*$
| %REGEXPMATCH=%HEADERS
'-

What's wrong with my approach here?

-- 
Regards,
Lars

The Bat! 1.54/10 on Windows NT 5.0 Build 2195 Service Pack 2
 
|Lars Geiger  |  mailto:[EMAIL PROTECTED]|



-- 
__
Archives   : http://tbtech.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]