How do I send a barcode to an application that requires my barcode scanner to be registered?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
wyatt121
Posts: 1
Joined: 21 Feb 2020, 17:37

How do I send a barcode to an application that requires my barcode scanner to be registered?

Post by wyatt121 » 21 Feb 2020, 17:53

Hi,

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}
[Mod edit: [code][/code] tags added]
rbabler
Posts: 4
Joined: 29 Mar 2021, 18:04

Re: How do I send a barcode to an application that requires my barcode scanner to be registered?

Post by rbabler » 19 Apr 2021, 12:11

I also want to scan into 2 apps but don't nee the register the scanner
Here is what I want to scan into
App1 a Open Excel file that wants to see a "6 number bar code"
App2 a open Chrome page that wants to see the same code
Post Reply

Return to “Ask for Help (v1)”