0 getting started, 1 javascript engine – Casio Naurtech CETerm Ver.5.5 Scripting Guide User Manual

Page 12

Advertising
background image

2.0 Getting Started

This section describes some common ways that scripting features can be used
within CETerm. Here we describe the JavaScript engine in CETerm and show
how to load and edit a script. We also show sample scripts which (1) handle
scanner input, (2) auto-login a terminal emulation session, and (3) provide user-
specified “hot-spots” on the screen. Only small code “snippets” are shown. For
complete details see the later sections of this manual.

2.1

J

AVA

S

CRIPT

E

NGINE

The CETerm JavaScript engine is a full JavaScript environment running in
CETerm that provides all the power and familiarity of JavaScript for automating
and extending your data collection process. Strictly speaking, CETerm contains
the Microsoft JScript engine, which has additional capabilities, but we will refer to
it as JavaScript.

The CETerm JavaScript engine is separate from the JavaScript engines which
are available in web browser sessions, but the two engines can communicate,
exchange data and send commands. Unlike the web browser engine, the
CETerm engine runs independently of any TE or browser session and can
interact with all sessions. This persistence allows the CETerm engine to
maintain state throughout a data collection workflow.

The CETerm script engine runs as part of the CETerm user interface and when
processing a script, the device keys and screen may be unresponsive. Think of
the script engine as a virtual user which can examine the screen and send input.
There are several techniques to write asynchronous scripts and to show
feedback to the user and get user input while a script is running.

Advertising
This manual is related to the following products: