Solved

bar code scanner capture input

Posted on 2010-08-30
5
769 Views
Last Modified: 2012-05-10
Hello Experts,
I have several applications that work with bar code scanners.
Every time in a visible or hidden way I have to focus the field where the scanner is going to deliver the input.
So if the application is focusing anyother object I have first to locate focus the right object and then scan.
Other wise the scaned barcode will be lost or generate undesired behavior.
Is there any way to realize that some input is comming from the bar code reader so the application itself may focus the right object just before the input arrives?
regards,
0
Comment
Question by:rguillermo
  • 2
  • 2
5 Comments
 
LVL 6

Expert Comment

by:radnbne
ID: 33563857
Most Barcode Scanners essentially operate like keyboards, it you type something in when not on a valid field nothing happens.

There are a couple of issues with automating the input.  For example how does the program determine whether the data it is receiving is from the scanner or the keyboard.

If your scanner is able to be treated as a different device you might be able to have a loop which captures that input, however this might interfere with any keyboard entry being done.

What sort of applications and what scanners are you using?
0
 

Author Comment

by:rguillermo
ID: 33563882
My application is a point of sales for a pharmacy, the scanner is a voyager from metrologic.
its a usb. How can I identify the input is comming from that particular USB connection?
The keyboard is in a different usb connection.
I don't know if this is possible.
Thank you.
0
 
LVL 6

Accepted Solution

by:
radnbne earned 500 total points
ID: 33563920
I don't think it is possible generally, not at a high level anyway.

Most of the apps I have programmed simply set focus to the control in order for the barcode to be scanned.

You might be able to get some ides here:

http://www.developerfusion.com/article/84338/making-usb-c-friendly/

0
 

Author Closing Comment

by:rguillermo
ID: 33564293
Thank you, that link helps a lot!
0
 
LVL 30

Expert Comment

by:Marco Gasi
ID: 33567283
I know this question has been closed, but I see you have posted it in Php Script language zone also, so I think my experience could be useful for you. I used barcodes in a php application to manage stock, orders, customers and invoices and I had the same problem: when I had to use barcode scanner I had to set focus to the right control manually. I solved this with a little piece of javascript code, but this could be useful or not depending how your app is structured. If in your app you have a page dedicated to scan barcodes (even if it is a multi-purposed page), then my suggestion could be interesting. Let me know if you are interesting in this kind of information: eventually you can reopen question and let me know, so I can post you my solution.

Best regards
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now