How do I send a barcode to an application that requires my barcode scanner to be registered?
I am trying to send a barcode to two different Windows Applications on 1 barcode scan using AutoHotkey.
App #1: Cadlink Digital Print Factory 10
App #2: Google Chrome
I have my barcode scanner programmed to activate AutoHotKey with CTRL+I.
The issue I'm having is that App #1 has built in barcode support, and it asks me "register" my barcode scanner by scanning any barcode 3x.
I'm able to register the barcode scanner through the app when running my below Autohotkey script, but then the barcode scanner will not work within the app when I use my Autohotkey script.
If I do not use my Autohotkey script through CTRL+I, and just use my reset un-programmed scanner to register/work with App #1, barcode scanning works perfectly within just App #1. But without Autohotkey, I won't be able to open App #2.
It seems to me I might not be sending the correct combination of keys to App #1 through Autohotkey. Maybe I'm missing an enter before/after, or something else?
Anybody have any experience using Autohotkey and software that requires a scanner to be "registered"?
Below is my script.
Any help is much appreciated.
Regards,
Wyatt
Code: Select all
#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.
^I::
input,barcode,,{enter}
Needle := "-"
If InStr(barcode, Needle)
found_barcode := "true"
Else{
SoundBeep, 300, 500
Exit
}
if WinExist("Digital Factory Apparel v10 Production Edition: Brother GTX-4")
WinActivate ; use the window found above
else
WinActivate, Calculator
send %barcode%
Send, {ENTER}