User manual - Scripting_Guide

2.3 CETERM AUTOMATION OBJECTS
The CETerm Automation Objects provide access to the running CETerm
application, session screens, the Windows CE operating system, and other
features. For example the command
CETerm.PostIDA( "IDA_SESSION_S1", 0 );
within a script would switch CETerm to Session 1 if another session was
currently active. Automation Objects can give access to the browser Document
Object Model (DOM) of connected web sessions and the text on terminal
emulation sessions. The IDA action codes are described briefly in the following
section.
The CETerm Automation Objects are similar to ActiveX controls that are used in
web pages, but they do not require any special creation operations prior to use.
In fact, the same CETerm Automation Objects are accessible from both the
CETerm JavaScript engine and the web browser JavaScript engines.
2.4 IDA ACTION CODES
An IDA Action Code is a special value that is used to invoke a device action,
program action, or emulator action within the Naurtech Smart Client. IDA Action
Codes can invoke special keys under terminal emulation, sound a tone, connect
a session, or show the SIP. There are many IDA codes and these are
documented in Appendix 1 of this manual. Almost any action which can be
invoked by a KeyBar or assigned to a hardware key can be invoked by an IDA
code. IDA codes can be submitted to CETerm in several different ways, under
both scripting and the web browser.
2.5 ONBARCODEREAD SCRIPT EVENT
CETerm generates several script events during operation. If there is a
corresponding event handler defined within the CETerm script engine, then that
handler will be invoked. The "OnBarcodeRead" event is a good example. The
OnBarcodeRead event handler can intercept and pre-process barcode scan data
using the full power of JavaScript before sending the data on to the TE or
browser session.
The OnBarcodeRead handler could do something simple, such as pre-pending
zero digits for short barcodes, or something complex such as splitting an
Automotive Industry Action Group (AIAG) B-10 barcode and putting different
parts into different fields on an IBM 5250 emulation screen.
Here is the OnBarcodeRead template that can be loaded in the script edit dialog