Re: cookie macro

2004-03-31 Thread dAniel hAhler
Hello bats,

on Wed, 31. Mar 2004 at 06:02:16 +1000 Robin Anson wrote:

 Change the Regex pattern as follows:
 %SETPATTREGEXP='(.*?)(?:\n)?(.*)'%-
 You might need (and I'm guessing 'cos I haven't tried it)
 %SETPATTREGEXP='^(.*?)(?:\n)?(.*)$'%-

Both should work.

 See Carsten's answer to my similar question at
 mid:[EMAIL PROTECTED]

In your case you need it because your regEx ^(.*?)(?: - .*)?$ has a
non-greedy .* and the second part is optional. Therefor it does not
match anything and you will have to bind it to start and end..


-- 
shinE!
GnuPG/PGP key: http://thequod.de/danielhahler.asc
lifted with The Bat! 2.05 Beta/12 on Windows XP Service Pack 1.



Current version is 2.04.7 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re: cookie macro

2004-03-30 Thread Jonathan Angliss
On Tuesday, March 30, 2004, rich gregory wrote...

DH %SETPATTREGEXP='(.*?\n)(.*)'%-
DH %REGEXPBLINDMATCH(%COOKIE=c:\sigs.txt)%-
DH %WRAPPED(%SUBPATT(1))
DH%SUBPATT(2)%-

 It works SOMETIMES! Occasionally I get no signature at all with this
 code. I think the failures only occur in single-line entries, those
 that do not contain a \n and citation.

That would be a correct observation. Because nothing matches part 1 of
the query (anything up to a \n character), and as it never matched
that, the second part never matches either, because it's everything
after a \n character. You might be able to use a ? after the \n to
make it 0 or more.

-- 
Jonathan Angliss
([EMAIL PROTECTED])
Using The Bat! v2.05 Beta/12 on Windows XP 5.1 Build 2600 Service Pack 1

Contraceptives: use 'em on all conceivable occasions.


pgp0.pgp
Description: PGP signature

Current version is 2.04.7 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Re: cookie macro

2004-03-30 Thread dAniel hAhler
Hello bats,

on Tue, 30. Mar 2004 at 01:30:45 -0500 rich gregory wrote:

DH %SETPATTREGEXP='(.*?\n)(.*)'%-
DH %REGEXPBLINDMATCH(%COOKIE=c:\sigs.txt)%-
DH %WRAPPED(%SUBPATT(1))
DH%SUBPATT(2)%-
 It works SOMETIMES!
 Occasionally I get no signature at all with this code. I think the
 failures only occur in single-line entries, those that do not contain
 a \n and citation.

Yeah, of course. Because without a newline it will never match.

Change the Regex pattern as follows:
%SETPATTREGEXP='(.*?)(?:\n)?(.*)'%-

That will make the \n optional and if it gets matched, it won't be
inserted into the %SUBPATT stack, because of the '?:' after the opening
parenthesis.

Hope that will do it.. :)


-- 
shinE!
GnuPG/PGP key: http://thequod.de/danielhahler.asc
lifted with The Bat! 2.05 Beta/12 on Windows XP Service Pack 1.



Current version is 2.04.7 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re: cookie macro

2004-03-30 Thread Robin Anson
On Wed 31 March 2004, 1:47:20 +1000, Daniel Hahler wrote:
 Hello bats,
 
 on Tue, 30. Mar 2004 at 01:30:45 -0500 rich gregory wrote:
 
DH %SETPATTREGEXP='(.*?\n)(.*)'%-
DH %REGEXPBLINDMATCH(%COOKIE=c:\sigs.txt)%-
DH %WRAPPED(%SUBPATT(1))
DH%SUBPATT(2)%-
 It works SOMETIMES!
 Occasionally I get no signature at all with this code. I think the
 failures only occur in single-line entries, those that do not contain
 a \n and citation.
 
 Yeah, of course. Because without a newline it will never match.
 
 Change the Regex pattern as follows:
 %SETPATTREGEXP='(.*?)(?:\n)?(.*)'%-
 
 That will make the \n optional and if it gets matched, it won't be
 inserted into the %SUBPATT stack, because of the '?:' after the opening
 parenthesis.

You might need (and I'm guessing 'cos I haven't tried it)
%SETPATTREGEXP='^(.*?)(?:\n)?(.*)$'%-
to anchor the pattern to the beginning and end of the subject, otherwise it
could match any minimum number of characters with the first part.

See Carsten's answer to my similar question at
mid:[EMAIL PROTECTED]

-- 
Robin Anson
Using The Bat! v2.04.7 on Windows XP 5.1 Build 2600 Service Pack 1




Current version is 2.04.7 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re: cookie macro

2004-03-28 Thread Jonathan Angliss
On Sunday, March 28, 2004, rich gregory wrote...

 The line does not wrap and the /n switch is not generating a new
 line, but appears in the text.

It's \n, and without your template, I cannot tell you why it's not
going to wrap.  %COOKIE doesn't wrap on it's own, you have to use

  %WRAPPED='%COOKIE=c:\sigs.txt'%-

As an example. However, if you put a single \n in, and use the
%WRAPPED marco, it'll remove it. To put in a spacer (like between my
reply to your message) you have to use \n\n in the file.

-- 
Jonathan Angliss
([EMAIL PROTECTED])
Using The Bat! v2.05 Beta/12 on Windows XP 5.1 Build 2600 Service Pack 1

I'm sick! I ought to be home in bed with a nurse.


pgp0.pgp
Description: PGP signature

Current version is 2.04.7 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Re: cookie macro

2004-03-28 Thread Jonathan Angliss
On Sunday, March 28, 2004, rich gregory wrote...

 Can I get it to show this way:
 ~~~
 I have always wanted to be somebody, but I see now I
 should have been more specific.
  - Lily Tomlin
 ~~~

Sure, don't use the %WRAPPED macro, and put in the single \n where you
want it to wrap ;)

-- 
Jonathan Angliss
([EMAIL PROTECTED])
Using The Bat! v2.05 Beta/12 on Windows XP 5.1 Build 2600 Service Pack 1

The Bagginses, they steals our taglines, preciou 


pgp0.pgp
Description: PGP signature

Current version is 2.04.7 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Re: cookie macro

2004-03-28 Thread dAniel hAhler
Hello bats,

on Sun, 28. Mar 2004 at 12:16:17 -0600 Jonathan Angliss wrote:

 Can I get it to show this way:
 ~~~
 I have always wanted to be somebody, but I see now I
 should have been more specific.
  - Lily Tomlin
 ~~~
 Sure, don't use the %WRAPPED macro, and put in the single \n where you
 want it to wrap ;)

Or use the %WRAPPED macro and replace \n\n afterwards with \n:

%SETPATTREGEXP='(.*?\n)\n(.*)'%-
%REGEXPBLINDMATCH=%WRAPPED(%COOKIE=c:\sigs.txt)%-
%SUBPATT(1)%SUBPATT(2)%-

You can even auto-indent the author of the cite by replacing the last
line with:
%SUBPATT(1) %SUBPATT(2)%-

HTH.. :)


-- 
shinE!
GnuPG/PGP key: http://thequod.de/danielhahler.asc
lifted with The Bat! 2.05 Beta/12 on Windows XP Service Pack 1.



Current version is 2.04.7 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re: cookie macro

2004-03-28 Thread dAniel hAhler
Hello bats,

on Sun, 28. Mar 2004 at 19:05:28 -0500 rich gregory wrote:

 Can I get it to show this way:
 ~~~
 I have always wanted to be somebody, but I see now
 I should have been more specific.
  - Lily Tomlin
 ~~~

DH %SETPATTREGEXP='(.*?\n)\n(.*)'%-
DH %REGEXPBLINDMATCH=%WRAPPED(%COOKIE=c:\sigs.txt)%-
DH %SUBPATT(1)%SUBPATT(2)%-

 WOW! Amazing. (I don't understand ANY of it.)

will explain the new one to you.. :)

 Are you saying that (with the above enhanced sig macro) the line from
 the sigs.txt file that generates the desired result example above need
 only be as follows?
 I have always wanted to be somebody, but I see now I should have been more 
 specific.\n - Lily Tomlin

No, with the above this won't work. But slightly modifying it and
we'll get what you want:
-8
%SETPATTREGEXP='(.*?\n)(.*)'%-
%REGEXPBLINDMATCH(%COOKIE=c:\sigs.txt)%-
%WRAPPED(%SUBPATT(1))
   %SUBPATT(2)%-
-8

This does a regular expression match on the %COOKIE, where the first
pattern (in parenthesis) is everything upto a newline, the second
pattern is the rest.
%REGEXPBLINDMATCH puts these patterns into %SUBPATT.
The output is then the wrapped first part with the indented pattern
that will match the author in your case.

 And thanks again!

no problem, glad I could help.


-- 
shinE!
GnuPG/PGP key: http://thequod.de/danielhahler.asc
lifted with The Bat! 2.05 Beta/12 on Windows XP Service Pack 1.



Current version is 2.04.7 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re: cookie macro

2004-03-24 Thread Allie Martin
Rich Gregory, [RG] wrote:

RG If a file, a text file I'd assume
RG (c:\progra~1\theba~1\cookies.txt?)

Just to add to this point. I've noted that the file doesn't have to
have a .txt extension. TB! will assume the file is a text file and
read it as such. At least this is so the last time I checked.

-- 
-=[ Allie ]=- (List Moderator and fellow end-user)

PGPKeys: http://key.ac-martin.com
Running The Bat! v2.04.7 on WinXP Pro (SP1) 


pgp0.pgp
Description: PGP signature

Current version is 2.04.7 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Re: cookie macro

2004-03-23 Thread Jonathan Angliss
On Tuesday, March 23, 2004, rich gregory wrote...

 From the Help file:

  COOKIE = filepath

[..]

 Is filepath above supposed to define a directory or a file?

 If a file, a text file I'd assume (c:\progra~1\theba~1\cookies.txt?)
 it would contained lines of text to be used along the lines of the
 THEBAT.TIP file.

It can be a full path to a file (including the file), or just the file
for a relative file path.  Mine for example is set to:

  %COOKIE='c:\sigs.txt'%-

-- 
Jonathan Angliss
([EMAIL PROTECTED])

If worst comes to worst, you *CAN* turn most things off.


pgp0.pgp
Description: PGP signature

Current version is 2.04.7 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Re: cookie macro

2004-03-23 Thread Jonathan Angliss
On Wednesday, March 24, 2004, rich gregory wrote...

JA It can be a full path to a file (including the file), or just the
JA file for a relative file path. Mine for example is set to:
JA %COOKIE='c:\sigs.txt'%-

 OK, so it is a file.

 1) Always a file?

Yes

 2) Is that file structured as THEBAT.TIP is so that each single line
 in the text document is referenced as a single item?

Each 'cookie' appears on it's own line. If you want the cookie to
appear with multiple lines in the email, use \n in the text of the
cookie to do the line breaks.

 3) Are the cookies always accessed sequentially (line by line)
 from the file?

No, %COOKIE is random.

-- 
Jonathan Angliss
([EMAIL PROTECTED])

There's too much blood in my alcoholic system


pgp0.pgp
Description: PGP signature

Current version is 2.04.7 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Re: cookie macro

2004-03-23 Thread Peter Meyns
Hi rich,

on Wed, 24 Mar 2004 01:26:40 -0500GMT, you wrote:

  (COOKIE = filepath)

rg 1) Always a file?

Yes.

rg 2) Is that file structured as THEBAT.TIP is so that each single line
rg in the text document is referenced as a single item?

That's right.

rg 3) Are the cookies always accessed sequentially (line by line) from
rg the file?

No, it is supposed to be random.

-- 
Cheers
Peter

Tagline for the night:
while( !asleep() ) sheep++;



Current version is 2.04.7 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html