Example, Property description values – Casio Naurtech CETerm Ver.5.5 Scripting Guide User Manual

Page 53

Advertising
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 53


Property

Description

Values

DeviceStateChangeEvent Event ID of event signaled when GPS

device state changes. If needed, you
must set this value before calling
Open(). The eventID must be obtained
by calling OS.Event.Create()

eventID

IncludeSatelliteData

Include satellite data with position
results if true. Default is false.

true, false

IsOpen

Indicates GPS device is open and
enabled. (read only)

true, false

LastError

Returns the last error value associated
with the GPS object.

unsigned
integer

LastPosition

Return last position data obtained by
GetPosition.

object
literal

MaximumAge

Maximum age in milliseconds of position
results returned by GetPosition. Default
value is 180000.

unsigned
integer

NewLocationDataEvent

Event ID of event signaled when GPS
position changes. If needed, you must
set this value before calling Open(). The
eventID must be obtained by calling
OS.Event.Create().

eventID

Example

The following example shows how the GPS device can be monitored and the
current location displayed. This example also uses the OS.Event methods, a
global hot-key, and CETerm.Message. The event is signaled by the GPS device
and used to update the display. The hot-key is used to terminate the demo. To
run this demo, simply load the full script into an available script slot and tap
“Test/Load”.

// GPS Demo Script

// WARNING: This demo overwrites the contents of Script 50.
// WARNING: This demo does not contain any error checking and
// WARNING: may not work on all devices.

// Constants
var VK_RETURN = 0x0D; // Enter key

// Function to update position display when position
// event is signaled.
function UpdateGPSPosition()
{

Advertising
This manual is related to the following products: