John Phillips @ 2005-Jun-11 10:54:13 PM
"Getting rid of blkank lines in new posts, etc." <mid:[EMAIL PROTECTED]>

>> Does that make (any sort of) sense?
> Err... sort off!  <g>

Let me try then. Macro are simply fancy ways of substituting text (for
the most part). For example, if you created a template like this:

-- BEGIN TEMPLATE --
This is my template.

It happens to be three lines long...
-- END TEMPLATE --

Every message you created based on that template would have exactly
those three lines in it. Notice the blank line in the middle. One like this:

-- BEGIN TEMPLATE --
Hello %OFROMNAME,
I am just confirming that I have received your order and am processing
it. You should expect shipment within the week.
-- END TEMPLATE --

Would produce the above text with the sender's name in place of
%OFROMNAME.

Now, your template has some "special" macros that modify properties of
the message and do not generate any text.

-- BEGIN TEMPLATE --
%FROM="John Phillips <[EMAIL PROTECTED]>"
%TO=""%TO="[email protected]"
%CC=""%CC=""
Hi Bat! Fans,
-- END TEMPLATE --

Notice that the first three lines have macros that do not generate any
text. However, there are still three lines there. They just happen to
be empty. To fix that problem, you could use this:

-- BEGIN TEMPLATE --
%FROM="John Phillips <[EMAIL 
PROTECTED]>"%TO=""%TO="[email protected]"%CC=""%CC=""Hi Bat! Fans,
-- END TEMPLATE --

As you can see, this is all on one line, which is 100% valid. Macros
do not have to be on their own lines. Since none of the macros produce
any text, all that is entered in the message body is "Hi Bat! Fans,".

Now, the %- macro is interesting. Think of it as a "carriage return
remover" macro. What it does it prevent the carriage return (or new
line [technically there is a difference]) from being put into the
message body. So, this macro:

-- BEGIN TEMPLATE --
%FROM="John Phillips <[EMAIL PROTECTED]>"%-
%TO=""%TO="[email protected]"%-
%CC=""%CC=""%-
Hi Bat! Fans,
-- END TEMPLATE --

tries to insert three carriage returns (one at the end of each line), but the 
%- macro stop all
three.

In summary, there are three primary kinds of macros:
* text generating macros, like %OFROMNAME,
* option setting macros, like %TO and %PGPMIME,
* and helper macros, like %CURSOR, %-, and %IF.

The first kind of macro generates text; the others do not.

Hope this helped!

-- 
Chris
Quoting when replying to this message is good for your karma.

Using The Bat! v3.5 on Windows XP 5.1 Build 2600 Service Pack 2.
Accessing a POP3 mailbox.

Those who can: do. Those who can't: teach. Those who cannot teach:
administrate.

Attachment: pgpPjblpmo8n2.pgp
Description: PGP signature

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

Reply via email to