User manual - Scripting_Guide

NAURTECH SMART CLIENTS FOR WINDOWS CE AND POCKET PC
CETerm Scripting Guide Page 55
OS.Alert("Unknown action type for expect.");
}
}
// Check if another match expected
this.state +=2;
target = this.args[this.state];
if (target != null)
{
// Schedule next check
this.Schedule();
}
else
{
// Done with this expect.
// Run any post-execution actions
if (typeof this.OnDone == "function")
{
this.OnDone( true );
}
}
}
else
{
// No match, schedule again
if (this.checkCount++ < this.maxCheckCount)
{
this.Schedule();
}
else
{
if (!this.silent)
{
OS.Alert( "Expect failed to find text \"" +
target + "\"" );
}
if (typeof this.OnDone == "function")
{
// Done but failed
this.OnDone( false );
}
}
}
}
}
function ExpectMonitor_Schedule()
{
// Schedule next check
var script = "ExpectMonitor.Instances[" +
this.session + "].Check()";