Barcode Scanner/Reader with Intuiface (Workaround)

This is an example for my workaround (with third party software Autohotkey) to scan products with a barcode scanner.

Requirements

Autohotkey Configuration

Download and unzip Autohotkey


In the Autohotkey Folder create a new File called Barcodereader.ahk
In this file copy the following code:

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.

SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

Loop 10
Hotkey, % “$~” A_Index-1, BarCodeHandler, on
BarCodeHandler:
Accu .= SubStr(A_ThisHotkey, 0)
If Strlen(Accu) > 4 && A_TimeSincePriorHotkey < 60
SetTimer, TheBigShebang, -60
If (A_TimeSincePriorHotkey > 100)
Accu := SubStr(A_ThisHotkey, 0)
return
TheBigShebang:
If Accu
req := ComObjCreate(“Msxml2.XMLHTTP”)
req.open(“GET”, “http://localhost:8000/intuiface/sendMessage?message=”+Accu, true)
req.send()
return

This code is copied & modified from the following two links:
https://autohotkey.com/board/topic/111749-add-keystroke-after-barcode-scanner/?p=657170
https://www.autohotkey.com/boards/viewtopic.php?t=28720

Create a Shortcut to start Autohotkey with the script:
Right Click on Desktop/New/Shortcut
2019-06-24_15h11_22
Insert the link to AutoHotkeyU64.exe Scriptname.ahk
For example:
e:\Users\Anwender\Downloads\AutoHotkey_1.1.30.03\AutoHotkeyU64.exe Barcodescanner.ahk


2019-06-24_15h14_23

To autostart Autohotkey+script copy the shortcut from description above to Autostart:
Windows+R
Shell:startup
2019-06-24_15h09_15

Intuiface Experience



Autohotkey will call the URL http://localhost:8000/intuiface/sendMessage?message=BARCODE
How is the experience arranged?

  • A scene where you “attract” the customer
  • A scene with product view
  • Excel sheet with product catalogue
  • Local Network Trigger Interface Asset (with trigger, when message received in any scene, then clear all column filters, filter columns by barcode where barcode = message of the Local Network trigger, go to scene product view)

That the Local Network Trigger works, you have to open Intuiface Configuration Tool and enable Accept remote actions at Port 8000
2019-06-25_17h03_33

Adding the Local Network Trigger:






If the barcode is not registered in the excel, there is also a message showing.

Intuiface experience:
https://my.intuiface.com/share/72acba80-aae3-4af8-b501-12d0ea0e5b07

Working Example Barcodes:
123456789

987654321

This should work with every scanner in HID mode
Successfully tested with:

  • Datalogic Magellan 800i (in USB HID mode)
  • Opticon OPN-2006 (in USB HID mode)

Currently known bugs:

  • No reaction, if you scan barcodes with nearly no pause in between (maybe i can fix this, or somebody has improvment suggestions in the AutoHotKey code)

I hope I explained my workaround for this problem in an understandable way.
Questions/Inputs are welcome :wink:

5 Likes

Thanks for the great tip @sandro.kollreider! :+1:

1 Like

Nice workaround ! How many seconds do you have between the scanning and the finding ?

1 Like

Thanks @sandro.kollreider for this very detailed guide about barcode scanners and the usage of Local Network Triggers.

Could you maybe share with us the model of scanner you’ve been using here?

1 Like

@vincent1
From scanning to switched scene it takes 1-2 seconds

@Seb
This should work with every scanner in HID mode
I tested

  • Datalogic Magellan 800i (in USB HID mode)
  • Opticon OPN-2006 (in USB HID mode)

Added this information at the original post

The only bug i currently found is, that it doesn’t react, if you scan barcodes with nearly no pause in between (maybe i can fix this, or somebody has improvment suggestions in the AutoHotKey code)