Ritlabs



List of Macros

Macros are special commands used within message templates. They allow you to automatically generate text, set message parameters and add your signature to the message. Every macro is preceded by the percentage symbol %.  

Here is the list of most common macros used in The Bat!: 
Macro Description
Message sender
%FROMNAME Sender's full name
%FROMFNAME Sender's first name
%FROMLNAME Sender's last name
%FROMADDR Sender's email address
%FROM = "address" Allows to change sender's address
%FOLDERFROMADDR FROM address specified in active folder properties
%FOLDERFROMNAME FROM name specified in active folder properties
%FOLDERORGANISATION, %FOLDERORGANIZATION Organization name specified in active folder properties
%BCC = "address(es)" Adds address(es) to BCC field
%CC = "address(es)" Adds address(es) to CC field
Message recipient
%TONAME Full name of the first recipient from TO field
%TOADDR Address of the first recipient from TO field
%TO = "address(es)" Adds address(es) to TO field
%TOLIST Full list of the recipients from TO field
%OTOADDR (reply and resend) Address of the first recipient of the original message
%OTONAME (reply and resend) Full name of the first recipient of the original message
Message subject
%SUBJ Message subject without Re: and Fwd: prefixes
%SUBJECT = "subject" Allows to assign new subject
%FULLSUBJ, %FULLSUBJECT New message subject (full). Note: Subject contains Re: and Re[n]: prefixes
%REPLYCOUNTER, %RECOUNT Reply counter. Example%SUBJECT="%RECOUNT  Let's change message subject"
%SINGLERE Removes Re prefix from reply
Message text
%CURSOR Moves cursor of message editor to a specified position in message text
%BLANK Allows to create a blank message
%CLEAR Clears message text when used in Quick Template
%QUOTES Original  message text is quoted
%QUOTES = "text" Any text is quoted
%COOKIE Random cookie taken from the list (Account->Properties->Templates->Cookies)
%INCLUDE = "file path" Inserts text from a quick template from the specified file
%QINCLUDE="handle", %QT="handle" Inserts the text generated by a Quick Template. The parameter must be the exact handle you defined in the Quick Template editor
%CAPITAL = "text" Converts the first letter of each word of the text to capitalized
%CAPITALFIRST = "text" Converts the first letter of the text to capitalized
%UCFIRST = "text" Converts the first letter of the text to capitalized
%UPPER = "text" Converts the specified text to upper case
%LOWER = "text" Converts the specified text to lower case
Date and time
%DATE , %DATE="text" Inserts the current date in the long date format defined in your system's settings under “Start -> Control Panel -> Date and Time” or under “Control Panel\ Clock, Language, and Region” if you are using Windows 8. You can use your own format using the parameters
%DATEEN Inserts the current date in the “day-of-week, month day, year” format, for example, Monday, February 23, 2015
%DATESHORT Inserts the current date in the short date format defined in your system's settings under “Start -> Control Panel -> Date and Time” or under “Control Panel\ Clock, Language, and Region” if you are using Windows 8
%DOW Inserts the current day of the week
%TIME, %TIME="text" Inserts the current time in the short time format defined in your system's settings under “Start -> Control Panel -> Date and Time” or under “Control Panel\ Clock, Language, and Region” if you are using Windows 8. You can use your own format using the parameters
%TIMELONG Inserts the current time in the long time format defined in your system's settings) under “Start -> Control Panel -> Date and Time” or under “Control Panel\ Clock, Language, and Region” if you are using Windows 8
%TIMELONGEN Time format: hours:minutes:seconds AM/PM
Message format
%ACCOUNT = "name" Sets the active account
%FOLDER="folder path" Defines active folder and account. Remember that all the personal information will be changed once you change the active account. Folder path should be defined the following way: \\account\folder\path or "folder\path"
%ATTACHFILE = "file path" Attaches specified file to the message
%ATTACHVCARD Attaches vCard  to the message
%ATTACHMENT List of files attached to the message
%CHARSET = "identifier" Defines the character set for the message. Character set IDs can be checked under “Options -> Preferences -> Other options -> Character Sets (XLAT)”
%LANGUAGE = "identifier" Sets the language of the spell checker.
%SPLIT Splits the outgoing message if it exceeds the size specified under “Account -> Properties-> Files & Directories”
%NOSPLIT Disables automatic splitting of the outgoing messages
%PRIORITY = "H/N/L" Sets message priority (H-high, N-normal, L-low)
%RCPTCONFIRM Sets the Receipt Confirmation request flag
%READCONFIRM Sets the Reading Confirmation request flag
System information
%ACCOUNTNAME Current account name
%FOLDERNAME Current folder name
%WINDOWSBUILDNUMBER Windows version build number
%THEBATSERIALNUMBER The Bat! serial number
%THEBATVERSION The Bat! version
%TRACKINGNUMBER Inserts a random hexadecimal 32-bit number
%PAGENUMBER Adds page numbers when printing messages
%TOTALPAGES The total number of pages when printing messages
%ACCOUNTATTACHDIR The full path to the attachment directory of the account. This macro is useful when used as parameter of the %ATTACHFILE, %INCLUDE and %PUT macros
%ACCOUNTDIR The full path to the account home directory. This macro is useful when used as parameter of the %ATTACHFILE, %INCLUDE and %PUT macros
%MAILDIR The full path to the program mail directory. This macro is useful when used as parameter of the %ATTACHFILE, %INCLUDE and %PUT macros
%PROGRAMDIR The full path to the program directory. This macro is useful when used as parameter of the %ATTACHFILE, %INCLUDE and %PUT macros
%SIGNCOMPLETE Automatically signs the message when it is completed
%ENCRYPTCOMPLETE Automatically encrypts the message when it is completed
%NOSIGNCOMPLETE Disables automatic message signing
%NOENCRYPTCOMPLETE Disables automatic encryption of the message
%USEPGP Enables OpenPGP for encryption/signing
%NOUSEPGP Disables OpenPGP for the message
%AUTOPGPMIME Sets the Auto PGP/MIME option
%PGPMIME Enables PGP/MIME for the current message
%NOPGPMIME Disables PGP/MIME option
%USESMIME Enables S/MIME for encryption/signing
%NOUSESMIME Disables S/MIME for the message
%INSERTPGPKEY = "address" Inserts the OpenPGP key for the specified address from the public key ring

Please note:
Macros can be used not only within message templates but also in Sorting Office. Some Sorting Office actions use macros as parameters. Thus, for example, you can move a message to a folder named %ODATE="yyyy-mm" (year and month of the message) or %ABFROMNAME (sender's name in address book), while folders will be created automatically.

Back to the list