Hallo Ralph, On Mon, 8 Nov 2004 03:43:36 +0100GMT (8-11-2004, 3:43 +0100, where I live), you wrote:
R> Guten Tag %If:"%ABToGender"="2":"Frau ":""%- R> %If:"%ABToGender"="1":"Herr ":""%- R> %If:"%ABToGender"="0":"":""%-%ABToName="%ToName", That would do fine, two comments though. With your last check you check whether you have nothing to do or nothing to do. ;-) So you'd do best to forget about that. Also I was using the %- macro to enhance the readability. It does nothing but tell TB to ignore the fact the it's the end of a line, so when you place something right behind it, you can forget it. So my result would be: Guten Tag %If:"%ABToGender"="2":"Frau ":""%- %If:"%ABToGender"="1":"Herr ":""%- %ABToName="%ToName", Or Guten Tag %If:"%ABToGender"="2":"Frau ":""%- %If:"%ABToGender"="1":"Herr ":""%ABToName="%ToName", Or even Guten Tag %If:"%ABToGender"="2":"Frau ":""%If:"%ABToGender"="1":"Herr ":""%ABToName="%ToName", I didn't realize that you were looking for something in German. Robin Anson placed a quick template in the macro repository http://cgi.marck.free-online.co.uk/library.php to address multiple recipients and Jurgen Haug and I playedwith it and we came with an adaption in German, that looked like this: ==================================================================================== %REM=" Include lasttnames 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 Modified a tiny bit by Roelof Otten on request of Jurgen Haug 23 July 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"%- #~ ==================================================================================== Save all texts between the long lines as a quick template called Greet_All_Recipients. That name is important, because it calls itself recursively. Whenever you'd like to use it you use this macro: %QInclude(Greet_All_Recipients) Quick templates (on this list commonly named QT) can be inserted in the QT editor: Options -> Quick Templates The nice thing about this template is that it picks the addressing part too. When you're sending your message in the morning, it'll say "Guten Morgen", otherwise it says "Guten Tag" It's a bit more formal than you might like, as it doesn't use any first names, but than again it triggers the handle first, when you've entered that. But you can change that by altering this: %Capital(%ABToHandle=^%ABToLName=+%ToLName+^), "%- into this: %Capital(%ABToHandle=^%ABToName=+%ToName+^), "%- I guess you don't follow me any longer, so I now I quit. ;-) -- Groetjes, Roelof "Welcome to Hell. Here's your copy of Windows95." - Satan The Bat! 3.0.2.5 Windows XP 5.1 Build 2600 Service Pack 2 1 pop3 account, server on LAN
pgpXFtaAA5cX8.pgp
Description: PGP signature
________________________________________________ Current version is 3.0.1.33 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html