User manual - Scripting_Guide

NAURTECH SMART CLIENTS FOR WINDOWS CE AND POCKET PC
CETerm Scripting Guide Page 26
SetScriptTimeout( millisec )
Set the maximum script execution time. This value may be updated during a
running script. If updated, the new timeout will apply starting at the time of the
change. A value of 0 will disable the timeout.
timeoutTimerID = SetTimeout( scriptExpression, delayMillisec )
Set a one-time timer to execute the scriptExpression after a delay of
delayMillisec. This method returns an ID that should be saved in a global variable
for later use with ClearTimeout if needed. Other scripts may run while waiting for
this timer. The scriptExpression is a string containing the script, but is commonly
a function invocation, such as “myTimerFunction( 3, ‘alert’ );”
Timers are especially useful with complex or long-running scripts. Timers can
also be used to defer an operation which is not possible within an event handler.
One-time timers should be used in preference to interval timers. In general,
scripts should perform a short action and exit. With a complex script such as a
state-machine, the state can be maintained in global variables and the script re-
activated periodically to check for state transitions and perform actions. See the
“expect” script and “ExpectMonitor” in Section 5.1 for an example of the use of a
timer.
Properties
The CETerm object has several application level properties.
Property Description Values
ActiveSession Current active session. (read only) 1-4
MaxSession Maximum session index. (read only) 4
Message Returns message object. (read only) object
TextInput Return text input object. (read only) object
3.2 THE SESSION OBJECT
The Session object gives access to session state. This section documents the
methods and properties of the Session object.