Home     Tour     Features     Order     Support     Contact  
 
 

Perl Script

[Professional and Corporate Editions Only]
You can use Perl Script to generate all or parts of your message. To engage the script, use the Script macro. Below you can find more details:

Language name: PerlScript

Distributor: ActiveState Software Inc.

Web site: http://www.activestate.com/

Installation: The distributer provides ActivePerl installer that installs both the language interpreter and active scriting engine.

Known issues:

Perl script engine does not report run-time errors. Therefore, if errors occur, the messages may not appear as intended, but you will not see an error message. Do preview before sending.

In some situations, non-ascii characters (such as Japanese or Russians) may be treated incorrectly. If you use such characters, test carefully.

Sample script: This script assumes that the recipient list has data fields Hours and Supervisor and composes a short text based on the values found in these fields.

$hours = $recipient->Hours;
if ($hours->unknown) {

$worked = 0;

} else {

$worked = $hours->value;

}

$left = 10 - $worked;
if ($left <= 0) {

$document->skip;

} else {

$document->write($recipient->item("Supervisor")->text);
$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. ");

}

}



 
   
 Home     Tour     Features     Order     Support     Contact  

Copyright © 1995-2014 Northern Software Inc. All Rights Reserved