Casio Naurtech CETerm Ver.5.5 Scripting Guide User Manual
Page 107

N
AURTECH
W
EB
B
ROWSER AND
T
ERMINAL
E
MULATION FOR
W
INDOWS
CE
AND
W
INDOWS
M
OBILE
CETerm Scripting Guide
Page 107
This script can be entered into any script slot and bound to a key combination for
activation. Yo
u must also load the “expect” and “ExpectMonitor” in a script slot
which is marked “Load at Startup” so that the functions are available for use.
5.2
P
RESENTING
V
ISUAL
F
EEDBACK
D
URING
S
CRIPT
E
XECUTION
The Message object can be displayed during script execution when you want to
provide a visual indication of script progress. The Message object is
asynchronous and a script can continue running while it is displayed. This is
unlike the OS.Alert() message which stops script execution and requires user
confirmation. There is only one Message object within CETerm and you can
change the Message properties within any script.
WARNING: You must exercise caution when using the Message box to avoid
leaving it visible after a script is done. You may want to provide a
cleanup script that can be activated by the user to be sure the
message is hidden.
Following is an example of using the Message box. This message will display
itself for 5 seconds and then disappear.
/* Show message for 5 seconds */
var m = CETerm.Message;
m.Text = "Processing data, please wait.";
m.Timeout = 5;
m.AbortButtonVisible = true; // does nothing because script exits
m.Progress = 0;
m.ProgressRunning = true;
m.ProgressVisible = true;
m.ProgressRate = 20;
m.IsVisible = true;
You may want to update the progress bar directly while processing data. Here is
an example.
/* Update progress and message during processing */
var m = CETerm.Message;
m.Text = "Processing data, please wait.";
m.Timeout = 0;
m.AbortButtonVisible = false;
m.ProgressRunning = false;
// Do some work