Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

CAUTION all the steps outside building the window in the Designer have to be done in a Client 
(by Design the Barcode Scanner ONLY reads from a Client)


  1. Download module from https://www.sepasoft.com/downloads/   current version 1.9.5 

    Barcode Scanner1.9.5 SP1
  2. Create a window and add the Barcode Scanner component
    (you can also add a Barcode and Input Text Field components that will display what is read)


  3. Configure the Barcode scanner property to enter the preamble found in the documentation
    then right click on the component to access the Scripting method : barcode → onBarcodeReceived

    the script example is the same as Barcode Scanner Module Overview (2.0)
    with added linking for a Text component and a Barcode component 



  4. Check the configuration

    Launch a Client and access you newly created window
    use the steps in Checking Scanner Configuration to increase the log level on the Barcode scanner module
    and read the Console log to find this:

    Code Block
    09:50:49.290 [AWT-EventQueue-0] DEBUG PMIBarcodeController - ------- Preamble found: \u0002. Start buffering...
    09:50:49.297 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Keyevent ID: 402, Ctrl, char: \uffff (?)
    09:50:49.298 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Handled: true  Buffering: true  Elapsed Time: 6  buffer: 3  echo 0
    09:50:49.299 [AWT-EventQueue-0] DEBUG PMIBarcodeController - -
    09:50:49.299 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Keyevent ID: 402, B, char: \u0002 ()
    09:50:49.304 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Handled: true  Buffering: true  Elapsed Time: 9  buffer: 4  echo 0
    09:50:49.304 [AWT-EventQueue-0] DEBUG PMIBarcodeController - -
    09:50:49.305 [AWT-EventQueue-0] DEBUG PMIBarcodeController - ########## Possible preamble = Keyevent ID: 402, B, char: \u0002 ()
    09:50:49.361 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Keyevent ID: 402, 0, char: \u0030 (0)
    09:50:49.363 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Handled: true  Buffering: true  Elapsed Time: 70  buffer: 7  echo 0
    09:50:49.363 [AWT-EventQueue-0] DEBUG PMIBarcodeController - -
    09:50:49.370 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Keyevent ID: 402, 4, char: \u0034 (4)
    09:50:49.371 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Handled: true  Buffering: true  Elapsed Time: 78  buffer: 10  echo 0
    09:50:49.372 [AWT-EventQueue-0] DEBUG PMIBarcodeController - -
    09:50:49.377 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Keyevent ID: 402, 1, char: \u0031 (1)
    09:50:49.378 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Handled: true  Buffering: true  Elapsed Time: 86  buffer: 13  echo 0
    09:50:49.379 [AWT-EventQueue-0] DEBUG PMIBarcodeController - -
    09:50:49.393 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Keyevent ID: 402, 1, char: \u0031 (1)
    09:50:49.394 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Handled: true  Buffering: true  Elapsed Time: 102  buffer: 16  echo 0
    09:50:49.395 [AWT-EventQueue-0] DEBUG PMIBarcodeController - -
    09:50:49.402 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Keyevent ID: 402, 6, char: \u0036 (6)
    09:50:49.403 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Handled: true  Buffering: true  Elapsed Time: 110  buffer: 19  echo 0
    09:50:49.404 [AWT-EventQueue-0] DEBUG PMIBarcodeController - -
    09:50:49.410 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Keyevent ID: 402, 7, char: \u0037 (7)
    09:50:49.411 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Handled: true  Buffering: true  Elapsed Time: 118  buffer: 22  echo 0
    09:50:49.412 [AWT-EventQueue-0] DEBUG PMIBarcodeController - -
    09:50:49.417 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Keyevent ID: 402, 0, char: \u0030 (0)
    09:50:49.418 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Handled: true  Buffering: true  Elapsed Time: 126  buffer: 25  echo 0
    09:50:49.419 [AWT-EventQueue-0] DEBUG PMIBarcodeController - -
    09:50:49.425 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Keyevent ID: 402, 6, char: \u0036 (6)
    09:50:49.427 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Handled: true  Buffering: true  Elapsed Time: 134  buffer: 28  echo 0
    09:50:49.427 [AWT-EventQueue-0] DEBUG PMIBarcodeController - -
    09:50:49.433 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Keyevent ID: 402, 4, char: \u0034 (4)
    09:50:49.435 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Handled: true  Buffering: true  Elapsed Time: 142  buffer: 31  echo 0
    09:50:49.435 [AWT-EventQueue-0] DEBUG PMIBarcodeController - -
    09:50:49.442 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Keyevent ID: 402, 1, char: \u0031 (1)
    09:50:49.443 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Handled: true  Buffering: true  Elapsed Time: 150  buffer: 34  echo 0
    09:50:49.444 [AWT-EventQueue-0] DEBUG PMIBarcodeController - -
    09:50:49.450 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Keyevent ID: 402, 2, char: \u0032 (2)
    09:50:49.451 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Handled: true  Buffering: true  Elapsed Time: 158  buffer: 37  echo 0
    09:50:49.452 [AWT-EventQueue-0] DEBUG PMIBarcodeController - -
    09:50:49.465 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Keyevent ID: 402, 2, char: \u0032 (2)
    09:50:49.466 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Handled: true  Buffering: true  Elapsed Time: 174  buffer: 40  echo 0
    09:50:49.467 [AWT-EventQueue-0] DEBUG PMIBarcodeController - -
    09:50:49.498 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Keyevent ID: 402, Enter, char: \u000a (
    )
    09:50:49.498 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Handled: true  Buffering: true  Elapsed Time: 206  buffer: 43  echo 0
    09:50:49.499 [AWT-EventQueue-0] DEBUG PMIBarcodeController - -
    09:50:49.500 [AWT-EventQueue-0] DEBUG PMIBarcodeController - ########## Possible preamble = Keyevent ID: 402, Enter, char: \u000a (
    )
    09:50:50.498 [AWT-EventQueue-0] DEBUG PMIBarcodeController -  *** Input Timeout KeyEventHandler SI (readtime 1000) ***
    09:50:50.499 [AWT-EventQueue-0] DEBUG PMIBarcodeController -  si.buffer: [Key Pressed, B, \u0002]
     [Key Released, Ctrl, \uFFFF]
     [Key Released, B, \u0002]
     [Key Pressed, 0, 0]
     [Key Released, 0, 0]
     [Key Pressed, 4, 4]
     [Key Released, 4, 4]
     [Key Pressed, 1, 1]
     [Key Released, 1, 1]
     [Key Pressed, 1, 1]
     [Key Released, 1, 1]
     [Key Pressed, 6, 6]
     [Key Released, 6, 6]
     [Key Pressed, 7, 7]
     [Key Released, 7, 7]
     [Key Pressed, 0, 0]
     [Key Released, 0, 0]
     [Key Pressed, 6, 6]
     [Key Released, 6, 6]
     [Key Pressed, 4, 4]
     [Key Released, 4, 4]
     [Key Pressed, 1, 1]
     [Key Released, 1, 1]
     [Key Pressed, 2, 2]
     [Key Released, 2, 2]
     [Key Pressed, 2, 2]
     [Key Released, 2, 2]
     [Key Pressed, Enter, \n]
     [Key Released, Enter, \n]
    
    09:50:50.501 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Barcode Scanner si.Regex target 041167064122
      pattern: \u0002.* = found: true
    09:50:50.502 [AWT-EventQueue-0] DEBUG PMIBarcodeController - Barcode Scanner Decode Results: Default
    09:50:50.503 [AWT-EventQueue-0] DEBUG PMIBarcodeController - value[0] = 041167064122
    {u'Default': [041167064122]}
    041167064122
    
    
  5. You are done



    There is, attached, a small Barcode Scanner 101.proj that should have everything you need except the preamble for your Barcode Scanner Model.
    It's a IA 7.19.10 version

...