Scripting Guide

NAURTECH WEB BROWSER AND TERMINAL EMULATION FOR WINDOWS CE AND WINDOWS MOBILE
CETerm Scripting Guide Page 97
Syntax
function OnStylusDown ( session, row, column )
session index of currently active session
row row of screen tap
column column of screen tap.
Example
Several samples for OnStylusDown were given in Section 2.7. Following is an
example that starts a barcode scan if the row contains the word “scan”. Not all
hardware devices support a scan trigger by script. If tapping on an IBM screen,
you must tap on an input field in the row, or the focus will not be in an input field
when the scan is sent to the session. Of course the “OnBarcodeRead” handler
could be used to force the scanned data into a preferred input field.
/* OnStylusDown */
function OnStylusDown ( session, row, column )
{
var screen = CETerm.Session( session ).Screen;
// Get row of text
var text = screen.GetTextLine( row );
// Look for "scan" as case-insensitive match
if (text.match( /scan/i ))
{
CETerm.PostIDA( "IDA_SCAN_TRIGGER", 0 );
}
}
4.17 THE ONTRIGGEREVENT EVENT
The OnTriggerEvent event is fired when the hardware trigger state changes.
Syntax
function OnTriggerEvent ( flags, id )
flags flags describing state change
id trigger id