Page 2 - Copyright Notice; CETerm; Software Version
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 2 Copyright Notice This document may not be reproduced in full, in part or in any form, without prior written permission of Naurtech Corporation. Naurtech Corporation makes no warranties...
Page 3 - Table of Contents
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 3 Table of Contents Copyright Notice .............................................................................................................................. 2 Trademarks ............
Page 7 - Preface; Naurtech Corporation; Assumptions; This manual uses the following typographical conventions:; represents new version specific information
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 7 Preface All of us at Naurtech Corporation constantly strive to deliver the highest quality products and services to our customers. We are always looking for ways to improve our solutio...
Page 8 - Additional Documentation; Support
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 8 Additional Documentation Naurtech Scripting is an integral feature of Naurtech Web Browser and Terminal E mulation Clients. Please refer to the User‟s Manual for detailed installation ...
Page 9 - as “Web 2.0” using Asynchronous
1.0 Introduction The Naurtech CETerm Clients provide a robust and flexible environment for Terminal Emulation and Web based applications on a mobile device. Our Clients are available for most Windows CE platforms including CE .NET 4.2, Windows CE 5.0, Windows CE 6.0, Windows Mobile 2003, Windows Mob...
Page 10 - EATURE; Naurtech uses the industry standard JavaScript scripting; Cross Session Scripting.; All Naurtech clients allow up to 5 simultaneous; Automation Objects.; CETerm Automation Objects are available to access; Enriched Web Browser Applications.; Naurtech Scripting can interact with
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 10 You may also need to consult standard references for HTML syntax, the browser Document Object Model (DOM), and other aspects of Dynamic HTML if you are scripting web browser features....
Page 11 - Event Activated Scripts.
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 11 Workflow Automation. Scripts can be used to automate routine tasks. The task may be a simple login process or a complex set of steps in your host application. Event Activated Scripts....
Page 13 - General Settings; General; Editing Scripts; Scripts
2.2 E NABLING S CRIPTING AND E DITING S CRIPTS Scripting is disabled by default. To enable scripting, open the configuration dialog [Session]->[Configure]->[Options]->[Configure Scripting] General Settings On the General tab, check the Enable box and check Show Script Errors . You may also ...
Page 15 - Load at Startup
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 15 current script is a function definition, it will be checked for correct syntax and will be made available to the script engine. If the current script contains executable statements or...
Page 17 - er is defined, it will override any “ScannerNavigate”
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 17 /* OnBarcodeRead */ function OnBarcodeRead ( session, data, source, type, date, time ) { // Manipulate barcode data here // Send barcode to emulator CETerm.SendText ( data, session );...
Page 19 - type; UTOMATED
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 19 } } // Handle scan data in normal way return 0; } The type argument to OnBarcodeRead contains the labeltype of the barcode. This labeltype is related to the barcode symbology but usua...
Page 20 - session
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 20 var waittime = 8000; // Milliseconds waiting for each text // Only login session 1 if (session == 1) { // Look for "login" then "password" expect( session, waittime, &...
Page 21 - USTOM; spots use the “OnStylusDown” event handler. Browser sessions do
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 21 2.7 C USTOM S CREEN H OT -S POTS A “hot-spot” is an area on a terminal emulation screen that is activated by taping with your finger or the stylus. CETerm supports several pre-defined...
Page 22 - PostIDA; must; wait for the action to complete before; ANDLING; WARNING
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 22 case 1: IDA = "IDA_VT_PF1"; break; case 2: IDA = "IDA_VT_PF2"; break; case 3: IDA = "IDA_VT_PF3"; break; case 4: IDA = "IDA_VT_PF4"; break; } // DEBUG:...
Page 24 - e “undefined” value that can result.
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 24 2.8.4 Optional Object Properties The object literal returned as a result may not always contain all possible properties. This is true for the File.GetList() method. The various file t...
Page 25 - CETerm Automation Objects; HE; CET; ERM; Methods; Method
3.0 CETerm Automation Objects This section describes the Automation Objects available to the CETerm script engine. These objects provide access to the running CETerm application, TE session screens, the Windows CE operating system, hardware device components, and other features for developing rich a...
Page 28 - reference and assign the text directly to the desired page
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 28 defined script from the web browser. To execute a script contained in a string from the CETerm engine use the JavaScript “eval()” method. SendIDA ( IDASymbolicName, session ) SendIDA ...
Page 30 - Properties; Property; Device
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 30 Properties The CETerm object has the following properties. Property Description Values ActiveSession Current active session. (read only) 1-MaxSession MaxSession Maximum session index....
Page 33 - BJECT; OS
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 33 3.3 T HE OS O BJECT The top level OS object provides access to operating system resources such as files, processes, windows, and the registry. Many of the automation objects on the OS...
Page 34 - This function is; This function is deprecated; Process
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 34 Use GetErrorMessage() to convert a non-zero status to a text message. You should immediately save the property LastExecProcess after a successful Exec call to obtain the process ID fo...
Page 36 - MemoryStatus
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 36 Property Description Values Network Returns the Network object. This object provides access to Windows network features. (read only) object Process Returns the Process object. This ob...
Page 37 - Browser
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 37 3.4 T HE B ROWSER O BJECT The Browser object gives access to a web browser session. The Browser object is a property of the Session object; CETerm.Session(i).Browser . This section do...
Page 38 - Event
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 38 Properties The following read-only properties are available. Property Description Values Document Document object of the current web page. The DOM of the page may be examined and alte...
Page 42 - The; LastError
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 42 status = SetListener ( eventHandleOrName, handlerScript, timeout ) Assign a handler script to an event. The eventHandle is obtained from a Create() call. If you use an eventName, the ...
Page 43 - File
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 43 3.6 T HE F ILE O BJECT The File object provides access to the Windows file system. The File object is a property of the OS object; OS.File . Methods The following methods are availabl...
Page 46 - FTP
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 46 Use the File properties LastError or LastErrorMessge to get additional error information. status = SetAttributes ( fileName, attributes ) Set the attributes of the file. Return true f...
Page 50 - GPS
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 50 Property Description Values LastError Returns the last error value associated with any FTP operation. (read only) unsigned integer LastErrorText Returns a text description of the last...
Page 53 - Example
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...
Page 56 - Keyboard; : On Windows Mobile devices, the CETerm setting “Disable Windows
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 56 Method Action AssignHotKey Assign a global hot-key. DeleteHotKey Delete a global hot-key. DeleteAllHotKeys Delete all global hot-keys. Enable Enable or disable the keyboard. IsEnabled...
Page 57 - : If the keyboard is disabled, it may render the device unusable and
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 57 status = DeleteAllHotKeys ( ) Delete all global hot-keys. Return 0. status = Enable ( enabled ) Enable or disable the hardware keyboard. If enabled is true the keyboard is enabled, if...
Page 59 - methods. The hot-key invokes a CETerm script that will check
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 59 Example The following example shows how a global hot-key may be assigned to cycle between several running programs. This example also shows the use of several OS.Window methods. The h...
Page 60 - Message; Message
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 60 // Switch between CETerm, Calculator, and Media Player. ToggleApplications( /ceterm/i, /calc/i, "Media Player" ); The last step is to assign the hot-key to run Script #8. This...
Page 61 - Network
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 61 Property Description Values AbortButtonVisible If true, a script abort button is visible. Taping this button will abort the current script execution. true, false IsVisible If true, me...
Page 65 - Registry; : Altering the registry can make your device unusable. Be sure you
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 65 3.13 T HE R EGISTRY O BJECT The Registry object provides access to the Windows registry. The registry is a form of database on Windows devices which holds the device configuration. Th...
Page 67 - Screen
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 67 JavaScript array, but it is easy to convert a Visual Basic array into a JavaScript array using the VBArray object. For example: var valuename = "HKLM\\Comm\\PY21BG1\\Parms\\TcpIp\...
Page 70 - SerialPort
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 70 status = CancelWaitForEvent ( ) Cancel the active event listener for the port. If canceled, changes in port status will not be reported through the event handler OnSerialPortEvent. Re...
Page 73 - Description
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 73 msdn.microsoft.com with the keywords “commtimeouts structure ce” and “DCB structure ce ”. In general, you should set all necessary properties before opening the serial port. However, ...
Page 75 - Session
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 75 Timeout Property Description Values ReadIntervalTimeout Maximum milliseconds allowed between the arrival of two bytes. If this time is exceeded the read call will return. A value of 0...
Page 76 - TextInput
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 76 Methods The Session object has no methods. Properties The Session object has several read only properties. Property Description Values Browser Returns browser object. (read only) obje...
Page 77 - Window; : Altering window visibility and input states can make your device
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 77 Properties The TextInput has the following properties. Property Description Values Input Can be pre-set with default response before calling GetInput. If GetInput returns 1, contains ...
Page 80 - to fail. There are very few messages that are valid from this method.
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 80 status = IsVisible ( windowHandle ) Check the visibility state of the specified window. Return true if the window may be visible or false if the window is hidden. A window in the “vis...
Page 82 - CETerm Script Events
4.0 CETerm Script Events This section describes the script events within the CETerm script engine. These events provide ways to trigger event handlers when various conditions occur in CETerm. The event handlers are arbitrary scripts. The event model in CETerm uses specific event handler names to bin...
Page 83 - OnBarcodeRead; Syntax
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 83 4.1 T HE O N B ARCODE R EAD E VENT The OnBarcodeRead event is fired when a barcode is successfully read. The handler can pre-process the data or check other conditions prior to passin...
Page 84 - The “PowerOn” handler is often
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 84 // Return 1 if handled data here return 1; } 4.2 T HE O N D OCUMENT D ONE E VENT The OnDocumentDone event is fired when a new webpage has completed loading into a web browser session....
Page 85 - IBMC; OMMAND
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 85 b.AddMetaItem( "Signal", "y=100" ); // Update information items for location to take effect CETerm.PostIDA( "IDA_INFO_REFRESH", session ); } } 4.3 T HE O N IBM...
Page 86 - OnKeyboardStateChange
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 86 // Submit screen to move to next action CETerm.PostIDA( "IDA_ENTER", session ); } 4.4 T HE O N K EYBOARD S TATE C HANGE E VENT The OnKeyboardStateChange event is fired when th...
Page 87 - OnNavigateError; error; Example for Windows CE 5.0 devices
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 87 else { if (PreviousKeyboardState[session] === IBM_KEYBOARD_NORMAL_UNLOCKED) { CETerm.PostIDA( "IDA_SCAN_SUSPEND", 0 ); } } // Save new state PreviousKeyboardState[session] = s...
Page 88 - call. This method saves the params in; Example for Windows Mobile devices
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 88 // Save params in text 3x where x is session index // This is required by CE 5.0 devices which do not pass // parameters to a "file:" URL. CETerm.SetProperty( "app.usertex...
Page 89 - OnNavigateRequest
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 89 4.6 T HE O N N AVIGATE R EQUEST E VENT The OnNavigateRequest event is fired before the browser begins a navigation. Normally, all navigation control should be done within the HTML of ...
Page 90 - OnNetCheckFailed
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 90 // Continue all other navigations return 0; } 4.7 T HE O N N ET C HECK F AILED E VENT The OnNetCheckFailed event is fi red if a “Network Check on Send” fails to detect the host system...
Page 92 - OnSerialPortEvent
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 92 Syntax function OnProgramStart ( ) This handler has no arguments and any return value is ignored. Example This example makes sure Session 3 is active when CETerm starts. /* OnProgramS...
Page 93 - OnSessionConnect; OnSessionDisconnect
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 93 4.11 T HE O N S ESSION C ONNECT E VENT The OnSessionConnect event is fired when a session initially connects to the specified host. The handler can be used to initiate an automated lo...
Page 94 - OnSessionDisconnected
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 94 Syntax function OnSessionDisconnect ( session ) session – index of session which was disconnected by user. Example This example will switch to the next connected session when the curr...
Page 95 - OnSessionReceive
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 95 { // Check RF status var status = CETerm.GetProperty ( "device.rf.status" ); if (status <= 0) { OS.Alert( "No RF signal detected.\n" + "Return to RF coverage an...
Page 96 - OnSessionSwitch; OnStylusDown
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 96 4.15 T HE O N S ESSION S WITCH E VENT The OnSessionSwitch event is fired when the active session changes. The handler can be used to perform a session specific action. Syntax function...
Page 97 - OnTriggerEvent
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 97 Syntax function OnStylusDown ( session, row, column ) session – index of currently active session row – row of screen tap column – column of screen tap. Example Several samples for On...
Page 98 - VTC; OnVTCommand
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE 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...
Page 102 - Scripting Techniques and Tips; XPECT AND
5.0 Scripting Techniques and Tips This section describes ways that scripting can extend the capabilities of CETerm. Tips for script development are also presented. 5.1 E XPECT AND E XPECT M ONITOR FOR A UTOMATING T ASKS The “expect” script and “ExpectMonitor” class provide a general purpose “prompt-...
Page 106 - can be automated with “expect”.
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 106 function ExpectMonitor_Abort() { // Stop any timer if (this.timer != null) { CETerm.ClearTimeout( this.timer ); this.timer = null; } // Set state to beyond reasonable range this.stat...
Page 107 - u must also load the “expect” and “ExpectMonitor” in a script slot; : You must exercise caution when using the Message box to avoid
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 107 This script can be entered into any script slot and bound to a key combination for activation. Yo u must also load the “expect” and “ExpectMonitor” in a script slot which is marked “...
Page 108 - ETTING
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 108 m.Progress = 0; m.IsVisible = true; OS.Sleep( 2000 ); // Simulate work delay // Update m.Progress = 20; m.Text = "Finding addresses, please wait."; OS.Sleep( 2000 ); // Simul...
Page 110 - CCESSING A
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 110 { // Resume online inventory, and save cached // data to file in background. CETerm.SetTimeout( "BackgroundSave(" + session + ");", 10 ); } } /* BackgroundSave */ fun...
Page 111 - CCESSING THE
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 111 { status = F.Write( filename, addedContent ); } return status; } 5.7 A CCESSING THE R EGISTRY The registry on a Windows CE device is a form of database which contains most of the dev...
Page 112 - ONTROLLING A
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 112 OS.Alert( "Failed to confirm write of " + fullyQualifiedKey ); } return status; } NewRegistryDWORD may be used as follows. // Write a new value NewRegistryDWORD( "SOFTWAR...
Page 114 - ReadTotalTimeoutConstant
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 114 5.8.3.1 Configuring SerialPort Timeouts When reading from the serial port, the default timeouts prevent blocking of the read operation. Most reads should be performed in response to ...
Page 115 - Using WaitForEvent to Detect Data and State Changes; command waiting for data, CETerm
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 115 var sp = Device.SerialPort( portIndex ); // Port configuration sp.EventMask = EV_RXCHAR | EV_DSR; sp.XOFFOutputFlowControl = false; sp.XOFFInputFlowControl = false; // See Appendix 4...
Page 117 - l define what a “complete
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 117 5.8.5 Using Single Byte Reads One pattern which often works well for handling serial port data is to read a single byte at a time and to accumulate data until a “complete message” ca...
Page 118 - RITING; We recommend “JavaScript: The
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 118 default: if (responseState === "DATA") { // Save character responseData.push( String.fromCharCode( c ) ); } break; } } if (responseState === "DONE") { // Process mess...
Page 120 - EBUGGING; Microsoft JScript runtime error
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 120 5.9.3 Limit Execution Time Because the script engine acts like a “virtual user”, when a script is executing, CETerm will seem unresponsive. You cannot have a script running continuou...
Page 122 - Appendix 1 - IDA Action Codes; Symbolic Name
Appendix 1 - IDA Action Codes Many IDA codes apply only to a Terminal Emulation session. Some IDA codes can only be used in restricted circumstances, such as IDA_URL. Symbolic Name Friendly Name Description IDA_BEL Bell IDA_BS Backspace IDA_HT Horizontal Tab IDA_TAB Tab IDA_LF Linefeed IDA_VT Vertic...
Page 131 - Appendix 2 - Properties; PPLICATION; EVICE; Property Name
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 131 Appendix 2 - Properties The properties listed in this appendix may be accessed via the GetProperty and SetProperty methods on the CETerm object. Properties marked (RO) are read-only ...
Page 132 - ESSION
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 132 Property Name Description device.presetid (RO) Windows CE Preset ID device.rf.strength (RO) RF signal strength 0-100, -2 – not associated with AP, -1 – unknown device.rf.status (RO) ...
Page 133 - NOTE
S CANNER P ROPERTIES Scanner properties are unique for each session. Scanner properties begin with “sessionX.scanner” where X is 1 through 4. For example “session4.scanner.enabled”. If no „X‟ value is found, the currently active session number is used. We use the name “scanner” for all types of barc...
Page 134 - : Not all properties are applicable to all hardware devices or all; Last Property Level
C OMMON S YMBOLOGY P ROPERTIES Symbology properties are unique for each session. Symbology properties begin with “sessionX.scanner.SSS” where X is 1 through 4 and SSS represents a symbology name and may be 3 or more characters long. For example “session4.scanner.upca.enabled”. If no „X‟ value is fou...
Page 135 - ODABAR; clsiediting
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 135 C ODABAR S YMBOLOGY P ROPERTIES Codabar specific symbology properties are unique for each session. Symbology properties begin with “sessionX.scanner.codabar” where X is 1 through. Fo...
Page 137 - FNC1char
C ODE 128 S YMBOLOGY P ROPERTIES Code 128 specific symbology properties are unique for each session. Symbology properties begin with “sessionX.scanner.code128” where X is 1 through. For example “session4.scanner.code128.ISBT”. If no „X‟ value is found, the currently active session number is used. NO...
Page 139 - Symbology Name
S YMBOLOGY N AMES Symbology properties begin with “sessionX.scanner.SSS” where X is 1 through 4 and SSS represents a symbology name and may be 3 or more characters long. The following table lists all available symbology names. WARNING : Not all symbologies are applicable to all hardware. Different d...
Page 141 - LabelType
Appendix 3 – Symbology LabelTypes This appendix contains a list of symbology labeltypes that are returned in the “type” argument of OnBarcodeRead. These are also available to a ScannerNavigate META tag handler. Please note that not all hardware devices return these values. You may need to test scan ...
Page 143 - Appendix 4 - Constants; ATTERY AND
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 143 Appendix 4 - Constants This appendix contains various constants that are used by CETerm Automation Objects. Many of these constants are a direct representation of the equivalent valu...
Page 144 - ROWSER
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 144 var BATTERY_CHEMISTRY_NICD = 0x02; var BATTERY_CHEMISTRY_NIMH = 0x03; var BATTERY_CHEMISTRY_LION = 0x04; var BATTERY_CHEMISTRY_LIPOLY = 0x05; var BATTERY_CHEMISTRY_ZINCAIR = 0x06; va...
Page 145 - ILE; IBM; TATUS
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 145 // Attempt to redirect the navigation failed. var INET_E_REDIRECT_FAILED = 0x800C0014; // Navigation redirected to a directory. var INET_E_REDIRECT_TO_DIR = 0x800C0015; // Unable to ...
Page 146 - EYBOARD
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 146 K EYBOARD C ONSTANTS // Constants used by OnKeyboardStateChange var IBM_KEYBOARD_HARDWARE_ERROR = 0; var IBM_KEYBOARD_NORMAL_LOCKED = 1; var IBM_KEYBOARD_NORMAL_UNLOCKED = 2; var IBM...
Page 148 - EGISTRY
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 148 var PLAYSOUND_FLAG_NODEFAULT = 0x00000002; // No default sound var PLAYSOUND_FLAG_LOOP = 0x00000008; // Repeat play, needs ASYNC. var PLAYSOUND_FLAG_NOSTOP = 0x00000010; // Don’t sto...
Page 149 - ERIAL
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 149 S ERIAL P ORT C ONSTANTS // Constants for SerialPort control object // // DTR Control Flow Values. // var DTR_CONTROL_DISABLE = 0x00; var DTR_CONTROL_ENABLE = 0x01; var DTR_CONTROL_H...
Page 151 - INDOW
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 151 var CLRDTR = 6; // Set DTR low // Gap for NT code RESETDEV, not supported on CE var SETBREAK = 8; // Set the device break line. var CLRBREAK = 9; // Clear the device break line. // S...
Page 153 - Appendix 5
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 153 Appendix 5 – Microsoft Virtual-Key (VK) Codes This appendix lists the standard Microsoft Virtual-Key codes. These codes are sent to applications when keys are pressed. Most devices g...
Page 158 - Glossary; external
Glossary Automation Objects Objects internal to CETerm that provide access to device, application, and session features from the script engine. CEBrowseX A Naurtech ActiveX control which provides access to the CETerm Automation Objects from a Windows Mobile device. external This is the name of an in...
Page 159 - Index
N AURTECH W EB B ROWSER AND T ERMINAL E MULATION FOR W INDOWS CE AND W INDOWS M OBILE CETerm Scripting Guide Page 159 Index A AbortButtonVisible · 61 AbortScript · 26 ActiveSession · 30 AddMetaItem · 37, 84, 85, 96 Alert · 33 Append · 43 ASCIIMode · 49 AssignHotKey · 56 B Battery Constants · 143 Bau...