This is an example for my workaround (with third party software Autohotkey) to scan products with a barcode scanner.
- Intuiface composer
- A Barcodescanner (in HID mode)
- Autohotkey (https://www.autohotkey.com/)
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.
Hotkey, % “$~” A_Index-1, BarCodeHandler, on
Accu .= SubStr(A_ThisHotkey, 0)
If Strlen(Accu) > 4 && A_TimeSincePriorHotkey < 60
SetTimer, TheBigShebang, -60
If (A_TimeSincePriorHotkey > 100)
Accu := SubStr(A_ThisHotkey, 0)
req := ComObjCreate(“Msxml2.XMLHTTP”)
req.open(“GET”, “http://localhost:8000/intuiface/sendMessage?message=”+Accu, true)
This code is copied & modified from the following two links:
Create a Shortcut to start Autohotkey with the script:
Right Click on Desktop/New/Shortcut
Insert the link to AutoHotkeyU64.exe Scriptname.ahk
To autostart Autohotkey+script copy the shortcut from description above to Autostart:
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
Adding the Local Network Trigger:
If the barcode is not registered in the excel, there is also a message showing.
Working Example Barcodes:
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