Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 791
  • Last Modified:

bar code scanner capture input

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
RaulGM BedoyaZdP
Asked:
RaulGM BedoyaZdP
  • 2
  • 2
1 Solution
 
radnbneCommented:
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
 
RaulGM BedoyaZdPProject ManagerAuthor Commented:
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
 
radnbneCommented:
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
 
RaulGM BedoyaZdPProject ManagerAuthor Commented:
Thank you, that link helps a lot!
0
 
Marco GasiFreelancerCommented:
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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now