Casio Naurtech CETerm Ver.5.5 Scripting Guide Manuale Utente Pagina 17

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 164
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 16
NAURTECH WEB BROWSER AND TERMINAL EMULATION FOR WINDOWS CE AND WINDOWS MOBILE
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 );
// Return 0 to handle barcode normally
// Return 1 if handled data here
return 1;
}
This handler simply passes the barcode data on to the current session using the
“SendText” method. The return value of 1 tells CETerm not to pass on the
barcode data with the usual wedge technique.
The following OnBarcodeRead handler will prefix 3 zeros to any 8 digit barcode
and pass other barcodes unchanged
/* OnBarcodeRead */
function OnBarcodeRead ( session, data, source, type, date, time )
{
// Prefix zeros to short barcodes
if (data.length == 8)
{
data = "000" + data;
}
// Send barcode to emulator
CETerm.SendText( data, session );
// Return 0 to handle barcode normally
// Return 1 if handled data here
return 1;
}
If the OnBarcodeRead handler is defined, it will override any “ScannerNavigate
handler defined in a web page META tag. The following OnBarcodeRead
handler will pass the scan on to the ScannerNavigate handler for a web browser
in session 2
/* OnBarcodeRead */
function OnBarcodeRead ( session, data, source, type, date, time )
{
// Don’t process for browser session
if (session == 2)
{
// Return 0 to handle barcode with ScannerNavigate
return 0;
}
Vedere la pagina 16
1 2 ... 12 13 14 15 16 17 18 19 20 21 22 ... 163 164

Commenti su questo manuale

Nessun commento