beautypg.com

19 the onwakeup event, Syntax – Casio Naurtech CETerm Ver.5.5 Scripting Guide User Manual

Page 99

background image

N

AURTECH

W

EB

B

ROWSER AND

T

ERMINAL

E

MULATION FOR

W

INDOWS

CE

AND

W

INDOWS

M

OBILE




CETerm Scripting Guide

Page 99


/* OnVTCommand */
function OnVTCommand( session, command, arg1, arg2, arg3, arg4 )
{
if (command === "PM")
{
// Format: PM text ST or ESC ^ text ESC \
// arg1 contains a text string
// Other args are undefined
if (arg1.charAt(0) === "1")
{
// Reply with special text
CETerm.SendText( "TDT;001;038\n", session );
}
}
else if (command === "ESCBangS" )
{
// Format: ESC ! 1;2;3;4;5;6;7;8;9;0;1;2;3;4;5 S
// Format (only two specified args): ESC ! 1;2 S
// 16 arguments are defined
// Arguments unspecified in the data stream have value -99
// You can put more "argX" arguments in the function
// definition or use the special JavaScript "arguments[]"
// array to access the values:
// arg1 === arguments[2]
// arg2 === arguments[3]
// ...
// arg16 === arguments[17]
// Process command
}
else if (command === "ESCTilda" )
{
// Format: ESC ~ E or ESC ~ S
// arg1 is 69 (E) or 83 (S)
// Process command
}
}

4.19

T

HE

O

N

W

AKEUP

E

VENT

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 ( )

This manual is related to the following products: