Hello Chris, On Wednesday, July 3, 2002 at 23:08 GMT +0100, a witness saw Chris Weaven [CW] type:
JA>> So let's analyze QuotesInit and hopefully that will make it obvious JA>> what you need to change. CW> Ummm, not obvious enough for me :-( Ok, well it isn't always obvious until you see it done a few times. CW> I'm a bit stressed aswell, as we're about to move house and lots CW> to do, so I'm not 100% focused :-( Fair enough. I hope the move goes well. CW> I really want to get my head around this, so I'll show you my CW> templates again and if you would be so kind as to give me the CW> answer, I'll piece it together. Ok, so I would put the following into a QT that generates the name for the attribution line: ====[Name QT]==== %OFROMFNAME %OFROMLNAME%- %IF:"%- %SETPATTREGEXP=""(?im-s)^X-Mailer\:.*(Bat!|Becky|Gnus|slrn).*$""%- %REGEXPBLINDMATCH=""%HEADERS""%- %SUBPATT=""1"""<>"":" [%QINCLUDE=""Initials""]":"" ====[End]==== Now in your main template, change: %OFROMFNAME %OFROMLNAME %QINCLUDE='Initials' to %QINCLUDE="Name" CW> One of the hardest things to get my head around is the delimiter, CW> as it seems a bit random :-) It isn't totally random. The choice of delimiters is arbitrary, but the structure is not. They are always nested. There have been a few threads that try to explain the process, so I'll point you to one of those first. Read the thread, and if it still seems odd, please ask (start a new thread, this one is getting huge). <http://www.mail-archive.com/tbtech@thebat.dutaint.com/msg01479.html> CW> I've had a few plays, but.... I'm sorry, I must be testing your CW> patience. I'm afraid to ask for assistance now and to just give CW> up. No, don't do that. This is definitely the place to ask and learn. In that spirit, I was trying to show you the logic of these templates. They really aren't terribly difficult, but you have to see the trick before it becomes obvious. The trick I'm talking about is visualizing the arguments of macros as mini-templates. Let's use a simplified example related to what you are trying to accomplish. Consider: %QUOTESTYLE="=%QINCLUDE='Initials'" Now, to be sure you understand what is happening, let's work backwards. You know that %QINCLUDE='Initials' will return "JA" without the quotes in your reply to this message. That means that the string passed to %QUOTESTYLE will be "=JA" without the quotes. Now %QUOTESTYLE sees the = sign and says "Aha! The rest of the string is the quote prefix." So it uses JA as the quote prefix. If that's clear, we can get even fancier and put in another level. It quickly gets quite complex so lets make sure you fully understand this example before moving on. CW> I hope you can put me out of my misery These are advanced templates that you're using. Don't be too upset that they seem confusing. Start with a simpler example, like the one above and see if you understand that. Then move on to this fancy system you're using. CW> and I'll try to work it out and explain it back to you to see if CW> I've got the method right. Sounds like a plan. CW> (Chris wanders of holding his head in disappointment and shame) Don't be ashamed, you're doing well. -- Thanks for writing, Januk Aggarwal If you throw a cat out of the car window, does it become kitty litter? ______________________________________________________ Archives : http://tbtech.thebat.dutaint.com Moderators : mailto:[EMAIL PROTECTED] Unsubscribe: mailto:[EMAIL PROTECTED]