Solved

bar code scanner capture input

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Great sound, comfort and fit, excellent build quality, versatility, compatibility. These are just some of the many reasons for choosing a headset from Sennheiser.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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…

773 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