Scripting Guide
NAURTECH WEB BROWSER AND TERMINAL EMULATION FOR WINDOWS CE AND WINDOWS MOBILE
CETerm Scripting Guide Page 98
Example
This example activates a corresponding trigger handling function in the current
browser session.
/* OnTriggerEvent */
function OnTriggerEvent( flags, id )
{
var index = CETerm.ActiveSession;
var Session = CETerm.Session(index);
if (Session.Browser.Document != null)
{
// Current session is browser session.
// Hand off processing to web page.
var script = "OnTriggerEvent("+ flags + "," + id + ");";
Session.Browser.RunScript( script );
}
}
4.18 THE ONVTCOMMAND EVENT
The OnVTCommand event is fired when a special command format is received by
a VT emulation session. The command includes a variable number of arguments
that depends on the received command. The handler script may perform any
desired actions. The screen text may contain additional information used by the
handler.
Syntax
function OnVTCommand ( session, command, arg1, arg2, arg3, arg4 )
session – index of session receiving the command
command – activating command, “ESCBangS”, “ESCTilda”, “APC”,
“OSC”, “PM”, “PU1”, “PU2”
arg1 – command argument. Terminating character for ESCTilda. Up to 16
arguments with values which range between 0 and 99 for ESCBangS.
Unspecified ESCBangS arguments have the value -99. String with content for
other commands.
Example
This example shows how to process the various possible arguments.