Casio Naurtech CETerm Ver.5.5 Scripting Guide Manual do Utilizador Página 17

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 164
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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;
}
Vista de página 16
1 2 ... 12 13 14 15 16 17 18 19 20 21 22 ... 163 164

Comentários a estes Manuais

Sem comentários