Computer Hope

Microsoft => Microsoft DOS => Topic started by: Zachareasy on February 27, 2013, 09:39:13 AM

Title: BAT file for Barcode Scanner (Accept input and place it into specific window/app
Post by: Zachareasy on February 27, 2013, 09:39:13 AM


I'm looking to implement a barcode scanner at my current job. However the software that came with it isn't helpful when it comes to pointing the input in the right direction.

I need a BAT file that will be triggered by only 1 COM port (USB).

As of right now when I scan something it just enters the input as if it were typed on the keyboard. I just need to direct it to the correct window/application and have it press enter.

This may be too complicated for a BAT file and maybe another language would be more appropriate. Any insight is appreciated!

Thanks in advance. Zach
Title: Re: BAT file for Barcode Scanner (Accept input and place it into specific window/app
Post by: foxidrive on February 27, 2013, 01:33:28 PM
Batch files can't be 'triggered' by a com port signal.

Maybe if you explain a bit more we'd understand what it is you want to do.  It's a bit hazy atm.
Title: Re: BAT file for Barcode Scanner (Accept input and place it into specific window/app
Post by: Zachareasy on February 27, 2013, 02:27:10 PM
I'm sorry for the confusion let me try and break it down a little better.

I have a barcode scanner attached via USB to a Windows 7 PC.

Right now: Whenever a barcode is scanned (Sales Order Number) it types in the number or value that it scanned to whatever window is active at the moment in Windows. (Word, Internet Explorer, Outlook, whatever is opened and active)

What I need: I'd like to direct any input from the scanner, no matter what window is active at the moment of scan, to a specific application: UPS OZ Link. (Shipping Software)

Lastly I'd like it to automatically send an Enter keystroke to submit the value that has been scanned and added to OZ Link.

I hope this helps!
Title: Re: BAT file for Barcode Scanner (Accept input and place it into specific window/app
Post by: foxidrive on February 27, 2013, 03:04:57 PM
What I need: I'd like to direct any input from the scanner, no matter what window is active at the moment of scan, to a specific application: UPS OZ Link. (Shipping Software)

Unless the scanner software supports command line switches, or configuration changes, to direct the output, then this can't be done when you are actively using other applications.  The active window is the only place the scanner data is going to, according to your explanation.

Title: Re: BAT file for Barcode Scanner (Accept input and place it into specific window/app
Post by: Zachareasy on February 28, 2013, 06:43:16 AM
The software it was bundled with isn't helpful at all. I believe its purpose is to be bundled with a POS system and configured that way. Unfortunately this doesn't help us with what we're trying to do.

I thought I'd ask because I'm not familiar with just how powerful batch programming can be. Thank you for your help I appreciate it!