Hello Roelof,

Thursday, July 22, 2004, 6:41:13 PM, you wrote:

> Use the %ABToGender macro

JH>> if gender = "male" then say "Herr " otherwise say "Frau " ...

> Yikes, you're forgetting that Gender has three options: unknown, male
> and female. So you'd need to check for male and then for female. Would
> be something like:
> %If:"%ABToGender"="1":"Herr ":"%-
> %If:'%ABToGender'='2':'Frau ':''"%-

> The values for Gender are:
> 0=unknown
> 1=Male
> 2=Female

thanks for the info - it works .... on it's own, but ...

smartpants  me  wanted to try to adjust a neat macro I found in the library, and
as  usual,  I  can't  get it to work. Without TBUDL I wouldn't use TB, because I
couldn't use it the way, it's supposed to!

What's wrong here?   I changed the last section.

  %REM="
   Include firstnames of all recipients in greeting up to the maximum
   number specified in %_GAR_Max.

   Uses The Bat! v2 syntax.

   Written by Robin Anson 19 Oct 2003
   Updated 28 May 2004
"%-
%-
%REM="
   %_GAR_Max stores the maximum number of names you want in the greeting
   line. Set this to suit your needs.
   %_GAR_Default stores a default greeting to use when the message has
   more than %_GAR_Max recipients. Set this to suit your needs.
   %_GAR_No is the number of names in the greeting.
   %_GAR_Text stores the original list of recipients.
   %_GAR_Temp stores the list of recipients yet to be processed.
   %_GAR_To stores the greeting.
"%-
%-
%REM="
   Adjust the %_GAR_Max and %GAR_Default values in the next lines to suit
   your needs 
"%-
%_GAR_Max=4%-
%_GAR_Default="Everyone,"%-
%-
%-%If:~%To~=~~::~%-
%If:#%_GAR_No#=##%-
:#%-
%_GAR_No="0"%-
%_GAR_Text=%ToList%-
%_GAR_Temp="%_GAR_Text,"%-
%_GAR_To=""%-
%QInclude(Greet_All_Recipients)#%-
:#%-
%IfN:~~%_GAR_No~~<=~~%_GAR_Max~~%-
:~~%-
%_GAR_No=%Calculate("%_GAR_No+1")%-
%If:'%setpattregexp="@"%regexpmatch="%_GAR_Temp"'<>''%-
:'%setpattregexp="(?i)^((?:.*?)@(?:.*?))(?:,|;)\s*(.*)?"%-
%regexpblindmatch="%_GAR_Temp"%-
%To=""%To=+%subpatt="1"+%-
%_GAR_Temp=+%Subpatt="2"+%-
%_GAR_To="%_GAR_To%-Guten %IF:%TIME<10:Morgen:Tag%-
%IF:%ABTOGENDER=2:Frau :Herr%-
%Capital(%ABToHandle=^%ABToLName=+%ToLName+^), "%-
%QInclude(Greet_All_Recipients)'%-
:'%_GAR_To'~~
:~~%GAR_Default~~%-
%To=""%To="%_GAR_Text"%-
#~


-- 
Best regards,
 J�rgen
:eu-flag3: :de-bw:

"Definition of Bagpipes: An Octopus Wearing A Kilt"

Using The Bat! v2.12.00, Opera v7.53.3850 on Win.XP.5.1.2600.SP1

* PGP key available on request: send mail with subject 'PGP key request'

Attachment: pgpy8qQT7sUoC.pgp
Description: PGP signature

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

Reply via email to