On Sun, 26 Feb 2006 at 18:16:39 +0700, Thomas wrote: >>> I thought TB always cut off trailing CR/LFs. I'm surprised you >>> experienced something else, but I have no old version to go back to >>> for testing. > RA>> No, I make extensive use of the fact that my version doesn't trim the RA>> trailing CR/LFs to decide whether a particular paragraph or line needs to go RA>> into a message or not. That text is then followed by one or two CR/LFs. > > Interesting. Can you share with us what the two trailing CR/LFs are > used for?
Sorry, my explanation wasn't particularly clear. Let me give you three examples of where I use this. Once every two weeks I send out emails to a team I work with reporting the status of current projects. Some of the senior team members get some additional information. Most of the email is standard text, and there is an spreadsheet with a date based name that gets automatically attached. For most of the team the email has two paragraphs thus: <person name> Paragraph A Paragraph B Regards Robin However senior team members get <person name> Paragraph A Paragraph C Paragraph B Regards Robin To manage this I have a QT that looks like <person name> Paragraph A %If:"%_person_status"="senior":"Paragraph C ":"":%- Paragraph B Regards Robin So the %If macro contains two trailing CR/LFs to ensure the paragraphs are appropriately and automatically spaced. As a second example, all my new mail templates start with a QT that inserts the initial greeting (it's in the macro & QT library as "Greet All Recipients"). If there are 4 or less recipients, it puts all the names in and starts, for example, Jo, Anne, Peter, Steve, Blah blah blah However if there are more than 4 recipients, I want no greeting at all, so the email will just start Blah blah blah To do this the QT includes a line (a bit like) %IfN:"%_number_of_recipients"<"5":"%_all_names ":"":%- %Cursor In this case again, if I have a greeting, it is followed by two CR/LFs, if not, the cursor appears at the top of the email. As a third example, the closing of my emails is set individually by recipient. For most work emails I close Regards Robin But close colleagues just get Robin The occasional more formal recipient gets Kind regards Robin Anson and my daughter gets Love, Dad I do this by including in the memo field of recipients address book entry a line like <closing text>Kind regards</closing text> Which gives the formal example above. If that entry is missing from an address book entry, they get the standard "Regards" closing and the close colleagues have an entry that reads <closing text/> which the QT understands means not use the default value, but actually use no value. My daughter gets the same closing text, but her address book entry has another entry that says <closing name>Love, Dad</closing name> That uses a different QT to include the name. The same QT puts "Robin Anson" in the formal closing. My closing QT recognises when there should be nothing at all, and doesn't insert even a CR/LF. Otherwise it inserts the text with a single CR/LF to split the closing into two lines. Now if I can't include trailing CR/LFs I could probably set something up in one QT that passed to the next QT an indication of the number of LEADING CR/LFs that should be included in it's output, and I could manually adjust the spacing by deleting or adding CR/LFs. But this is messier, and I don't have to do this in v3.0.1, so I don't want to have to do it in the later version. -- Robin Using The Bat! v3.0.1.33 Windows XP 5.1 Build 2600 Service Pack 2 Popfile v0.22.3 ________________________________________________ Current version is 3.65.03 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html