Solved

bar code scanner capture input

Posted on 2010-08-30
5
775 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 31

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
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 and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

863 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

24 Experts available now in Live!

Get 1:1 Help Now