User manual - Scripting_Guide

NAURTECH SMART CLIENTS FOR WINDOWS CE AND POCKET PC
CETerm Scripting Guide Page 50
// Look for "scan" as case-insensitive match
if (text.match( /scan/i ))
{
CETerm.PostIDA( "IDA_SCAN_TRIGGER", 0 );
}
}
4.11 THE ONWAKEUP EVENT
The OnWakeup event is fired when the device resumes after suspending. The
handler can be used to perform any action, such as waiting for RF coverage or
switching to a specific session.
Syntax
function OnWakeup( )
Example
This example will wait for RF coverage to resume and sound a tone when it is
available. While waiting, a “tic” sound will be made periodically to indicate the
check. This sample is more complex than needed, but it illustrates how to use
global variables and timers to periodically check state.
/* RFSoundOnConnect */
// Global control variables
var RFWakeupSoundTimerID = 0;
var RFWakeupSoundContinue = 0;
var RFWakeupSoundInterval = 200; // milliseconds
var RFWakeupSoundCountMaximum = 50; // 50*200 = 10 seconds
var RFWakeupSoundCount = 0;
function OnWakeup()
{
// Start with wakeup event
RFWakeupSoundStart();
}
// Function to start RF check
function RFWakeupSoundStart()
{
if (!RFWakeupSoundContinue)