User manual - Scripting_Guide

NAURTECH SMART CLIENTS FOR WINDOWS CE AND POCKET PC
CETerm Scripting Guide Page 56
this.timer = CETerm.SetTimeout( script, this.checkDelta );
}
function ExpectMonitor_Start()
{
// Cleanup first in case restarted
this.Abort();
// Initialize state
this.state = 0;
this.checkCount = 0;
this.Check();
}
function ExpectMonitor_Abort()
{
// Stop any timer
if (this.timer != null)
{
CETerm.ClearTimeout( this.timer );
this.timer = null;
}
// Set state to beyond reasonable range
this.state = 1000;
}
// Method definitions
ExpectMonitor.prototype.Check = ExpectMonitor_Check;
ExpectMonitor.prototype.Schedule = ExpectMonitor_Schedule;
ExpectMonitor.prototype.Start = ExpectMonitor_Start;
ExpectMonitor.prototype.Abort = ExpectMonitor_Abort;
ExpectMonitor.prototype.OnDone = null;
// Check every 200 milliseconds
ExpectMonitor.prototype.checkDelta = 200;
// About 10 seconds for each text check
ExpectMonitor.prototype.maxCheckCount = 50;
// Allow messages
ExpectMonitor.prototype.silent = false;
// Class statics
ExpectMonitor.Instances = [];