Common Base Macros
Hint: See Python Language for details of the macro language and TEA's macro API.
Answer Base Macro
This macro is always executed before execution of the template's individual answer macro. The computed name space (all set variables) is also inherited to the template's macro.
Classification Base Macro
This macro is always executed before execution of the template's individual classification macro. The computed name space (all set variables) is also inherited to the template's macro.
Application Init Macro
This macro is executed when TEA starts (or when you press the "Run App Init Macro" button in this dialog. The computed name space (all set variables) is also inherited to the other 2 Base Macros! Thus can e.g. define global utility functions etc... like:
def test_from_me():
return 'xellsoft.com' in mail.From
A special function is def email_once_script_classifier(). If this function is defined here, then it is executed once for all templates when a new mail is classified (the Classification Base Macro is executed for each template which is classified against the new mail). This can improve run-time for complex classification setups.
def email_once_script_classifier():
global from_me
from_me=test_from_me() # mail.From is constant for each template!
|