Pages: 1
RSS
Attachment and template
 
Hello,

In a template (for New Message), I have this:

%IF:"%ATTACHMENTS"=_<none>_:"Aucune":%IF:"%ATTACHMENTS"<>_<none>_:"%ATTACHMENTS."

("Aucune" because I use French).

When I create a new mail, I see "Aucune" and if I attach a file without any other action, I see the name of the file. That is correct.

But if I make another action (for example to write) BEFORE attaching the file, I continue to see "Aucune", the name of the attachment does not appear.

How to correct this bad functioning?

Thanks for your help.

 
That's the way it should work.

TB interprets the template as soon as you start typing the text (or enter the text field of the editor). Anything else would be wrong, because then you'd edit the message, do something else and the macros would be interpreted again and your text would change.
Suppose you'd be replying to a message, delete half of the quoted message, add an attachment and the get the full quotes back, as all macros got interpreted again (including the %Quotes macro).
Without a full rewrite on TB's macro engine, enabling some macros to be evaluated continuously and some not, the current way is the only decent option.

So far the why this isn't bad functioning.

Is it possible to insert a full list of the attachments after you've done all attaching? Sure. It'll take a little bit of manual work, but only a little bit.
Create a quick template (QT) called AttList (Short for Attachment List)
Set the contents of the QT to this single line:
Attachments: %Attachments
After you've altered the attachments, you select the line with your old attachments list and type AttList (thus overwriting that line) now you press Ctrl-Space and the QT called AttList is executed and will write down your new attachment list for you.
__________________________________
I'm just a user of The Bat! I don't work for Ritlabs.
 
Quote
Is it possible to insert a full list of the attachments after you've done all attaching? Sure. It'll take a little bit of manual work, but only a little bit.
Create a quick template (QT) called AttList (Short for Attachment List)
Set the contents of the QT to this single line:
Attachments: %Attachments
After you've altered the attachments, you select the line with your old attachments list and type AttList (thus overwriting that line) now you press Ctrl-Space and the QT called AttList is executed and will write down your new attachment list for you.
Impeccable, it works perfectly.

Thanks for your help.
Pages: 1