TCL Script
[Professional and Corporate Editions Only]
You can use TCL to generate all or parts of your message. To engage the script, use the Script macro. Below you can find more details:
Language name TCLScript
Distributor: ActiveState Software Inc.
Web site: http://www.activestate.com/
Installation: The distributer provides ActiveTcl installer that installs both the language interpreter and active scriting engine.
Known issues:
TCL script engine does not provide any details on errors that occur, which makes design and testing of TCL scripts extremely difficult.
Due to a bug in TclScript.DLL 3.9, the objects returned by item or date methods of the recipient object are unusable. That is, you cannot access values with constructions [[recipient item "Name"] value] or [[recipient Name] value]. Use [recipient value "Name"] instead. Similarly, use [recipient unknown "Name"] and [recipient text "Name"] instead of [[recipient Name] unknown] and [[recipient Name] text]. This could be fixed in future releases of TclScript/TCom.
TCL script engine leaks memory. Memory leak occurs when you close a Preview window and when sending stops. If you're repeating these actions many times in a row we suggest closing and re-opening AY Mail from time to time to alleviate memory losses.
Values retrieved from data fields of date or time types are treated as ordinary numbers.
Sample script
if {[recipient unknown "Hours"]} {
set worked 0
} else {
set worked [recipient value "Hours"]
}
set left [expr 10 - $worked]
if {$left <= 0} {
document skip
} else {
document write [recipient text "Supervisor"]
document write " reports that you "
if {$worked == 0} {
document write " have not worked on your assignment. "
} else {
document write "only worked for "
if {$worked == 1} {
document write " one hour. "
} else {
document write "$worked hours. "
}
}
document write "You need "
if {$left == 1} {
document write " one more hour. "
} else {
document write "$left more hours. "
}
}
|