Hello all,

Yes, last night I finally installed v2.0 and, after I recovered from the
shock produced by the new icons ;-), I was playing around with it for a
while and, as expected, most of my problems came with a number of QTs
and templates that I use and that don't work in v2.0.

Looking in TBUDL and TBBeta archives I found enough info to update a
number of "known" ones (like boxquote, quote_bl, and some others), but
there is a set I can't get working 100%.

The set (template(s) and QTs) are used to properly align (one per line)
a list of addresses form the To or CC fields when replying to,
forwarding or printing a message.

For example, these headers:

> From: Manuel Chico <[EMAIL PROTECTED]>
> To: Beta <[EMAIL PROTECTED]>
> Cc: Mick Williams <[EMAIL PROTECTED]>, Support
>          <[EMAIL PROTECTED]>, Hannah Loren <[EMAIL PROTECTED]>
> Subject:  Some suggestions from clients
> Date: Tue, 11 Feb 2003 15:53:36 -0000


Will be printed or quoted like this:

>    From: Manuel Chico <[EMAIL PROTECTED]>
>    Date: Tuesday, February 11, 2003 5:53:36 PM                          
>      To: Beta <[EMAIL PROTECTED]>
>      Cc: Mick Williams <[EMAIL PROTECTED]>
>          Support <[EMAIL PROTECTED]>
>          Hannah Loren <[EMAIL PROTECTED]>
> Subject: Some suggestions from clients

,----- [ This is for example my reply template ]
| --------- Original Message ---------
|    From: %OFromName <%OFromAddr>
|    Date: %ODateEn %OTimeLongEn                          %IF:'%OTOLIST'<>'':'
|      To: %COMMENT="%OTOLIST; "%QINCLUDE="print_recipient"' %IF:'%OCCLIST'<>'':'
|      Cc: %COMMENT="%OCCLIST; "%QINCLUDE="print_recipient"'
| Subject: %OFULLSUBJ
| 
| %TEXT
`-----

,----- [ This is 'print_recipient' QT ]
| %COMMENT="9
| %COMMENT"%-
| %SETPATTREGEXP="(?s-m)^\s{9}(.*)\n$"%-
| %REGEXPMATCH="%QINCLUDE='print_recipient2'"%-
| %COMMENT=""%-
`-----

,----- [ And this 'print_recipient2' ]
| %REM='
|       Recipient List reformating routine.
|       recipient2 = recursive engine QT
|       
|       Written by Januk Aggarwal
|       November 2002
| '%-
| %-
| %IF:'%-
| %SETPATTREGEXP=$(?i)^\d*\n(\"?(.*?)\"?\s*(\<.*?\>)?\s*[;,]\s*)$%-
| %REGEXPMATCH=$%COMMENT$'<>'':'%-
| %-
| %SETPATTREGEXP="\s{%-
| %-%-%SETPATTREGEXP=#^\d*#%-
| %-%-%REGEXPMATCH=#%COMMENT#}"%-
| %REGEXPMATCH="                                        "%-
| %-
| %SETPATTREGEXP=$(?i)^\d*\n((\"?(.*?)\"?\s*(\<.*?\>)?)\s*[;,]\s*)?$%-
| %REGEXPBLINDMATCH=$%COMMENT$%-
| %SUBPATT=$2$
| %-
| %COMMENT=_%-
| %-%-%SETPATTREGEXP=$(?i)^(\d*\n)(\"?(.*?)\"?\s*(\<.*?\>)?\s*[;,]\s*)?(.*)$%-
| %-%-%REGEXPBLINDMATCH=$%COMMENT$%-
| %-%-%SUBPATT=$1$%-
| %-%-%SUBPATT=$5$_%-
| %-
| %QINCLUDE="print_recipient2"'%-
`-----

Again looking in archives I found out about a QT for v2.0 called
"Recipients list". So, with v2.0 I tried this:

Reply template as above.

,----- [ 'print_recipient' for v2.0 ]
| %_RL_Num_Space("9")%-
| %_RL_Text="%Comment"%-
| %SetPattRegexp="^(?s)\s{%_RL_Num_Space}(.*)\Z"%-
| %RegExpMatch="%-
| %___%QInclude='Recipient List'"
`-----

,----- [ 'Recipient List' ]
| %REM='
|        Recipient List reformatting routine using features from TB 1.63b11
|        Written July 2003 by Januk Aggarwal
| 
|        Notes:
|           1. This template can be used alone to reformat clipboard
|              contents or can be used as a reformatting engine by
|              assigning text to the variable, %_RL_Text, in the driver
|              template. 
|           2. Indenting can be specified  by defining number of leading
|              spaces in %_RL_Num_Space variable.
| '%-
| %-
| %IF:'%_RL_FirstTime'='':'%-
| %___%IF:"%_RL_Text"="":"%_RL_Text(""%Clipboard; "")"%-
| %___%IF:"%_RL_Num_Space"!="":"%-
| %______%SetPattRegexp=""(\s{%_RL_Num_Space})""%-
| %______%RegExpBlindMatch=""                                                          
  
|                                     ""%-
| %______%_RL_Leading_Space(%SubPatt(1))":"%-
| %______%_RL_Leading_Space()"%-
| %___%_RL_FirstTime="No"'%-
| %-
| %IF:'%_RL_Text'!='':'%-
| %-
| %___%SetPattRegexp=!(?x)
|       ^\s*                     # Strip Leading Spaces
|       (                        # SubPatt 1 - First Item + Delimiter
|         (                      # SubPatt 2 - First Item
|           (\"?)                # Opening Quotation marks
|             (.*?)              # SubPatt 4 - Name
|           \3                   # Closing Quotation marks if opening ones exist
|           \s*
|           (\<.*?\>)?           # SubPatt 5 - Address
|         )                      # Close First Item
|         \s*[;,]\s*             # Delimiter and white space
|       )                        # Close First Item + Delimiter
|       (.*)                     # SubPatt 6 - Remainder of list
|       \Z!%-
| %___%RegexpBlindMatch(%_RL_Text)%-
| %-
| %___%_RL_Name_Addr(%SubPatt(2))%-
| %___%_RL_Name(%SubPatt(4))%-
| %___%_RL_Addr(%SubPatt(5))%-
| %___%_RL_Text(%SubPatt(6))%-
| %-
| %___%_RL_Leading_Space%-
| %___%_RL_Name %_RL_Addr
| %-
| %QInclude("Recipient List")'%-
`-----

Well, this combination works but, as I have said, not 100%. What I get
on my replies or prints is:

>    From: Manuel Chico <[EMAIL PROTECTED]>
>    Date: Tuesday, February 11, 2003 5:53:36 PM                          
>      To: Beta <[EMAIL PROTECTED]>
>
>
>
>      Cc: Mick Williams <[EMAIL PROTECTED]>
>          Support <[EMAIL PROTECTED]>
>          Hannah Loren <[EMAIL PROTECTED]>
>
>
>
> Subject: Some suggestions from clients

There are 3 blank lines after the To list and 3 blank lines after the CC
one.

If I change my reply template to:

,----- [ Modified reply template ]
| --------- Original Message ---------
|    From: %OFromName <%OFromAddr>
|    Date: %ODateEn %OTimeLongEn                          %IF:'%OTOLIST'<>'':'
|      To: %COMMENT="%OTOLIST"%QINCLUDE="print_recipient"' %IF:'%OCCLIST'<>'':'
|      Cc: %COMMENT="%OCCLIST"%QINCLUDE="print_recipient"'
| Subject: %OFULLSUBJ
| 
| %TEXT
`-----

Where I have just changed  %COMMENT="%OTOLIST; " to %COMMENT="%OTOLIST"
and %COMMENT="%OCCLIST; " to %COMMENT="%OCCLIST" (I have deleted the
semicolon and space), what I get is this:

>    From: Manuel Chico <[EMAIL PROTECTED]>
>    Date: Tuesday, February 11, 2003 5:53:36 PM                          
>      To: Beta <[EMAIL PROTECTED]>
>
>
>      Cc: Mick Williams <[EMAIL PROTECTED]>
>          Support <[EMAIL PROTECTED]>
>          Hannah Loren <[EMAIL PROTECTED]>
>
>
> Subject: Some suggestions from clients

That is, I get 2 blank lines after each list instead of 3. But I would
obviously like to get rid of those blank lines too and I don't know how.

Any help will be greatly appreciated.

-- 
Best regards,

Miguel A. Urech (El Escorial - Spain)
Using The Bat! v1.62r


________________________________________________________

http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to