Solved

Barcode Scanner string conversion

Posted on 2010-11-10
4
728 Views
Last Modified: 2013-12-27
We are developing an application that needs a barcode reader (any make and model) to read SUPPLIERS barcodes, and then look up a corresponding COMPANY STOCK CODE in a lookup table and input this into the running application as a string - i.e. as if the barcode read was the looked-up string.

THis will involve

1. intercepting the barcode read
2. processing it,
3. injecting the result into the keyboard buffer.

2 and 3 are easy, but 1 isn't.  Is there anything out there to do this?

I can't believe this is the first question on this, but I cannot find any previous posts: but it is difficult to search for....

0
Comment
Question by:jonathonberg
4 Comments
 
LVL 3

Expert Comment

by:roynaufal
ID: 34102911
Hello,

I am not totally sure I understand what you mean, so can you please explain and give a bit more details on step 1 ?
0
 
LVL 1

Expert Comment

by:Sindread
ID: 34102913
This should be very simple.
When you scan with the barcode reader it will input the barcode as if it were text to the pc.
for example if you had notepad open it would display the code.

For the processing aspect would be dependant on how you want to program this in whatever language.
you could do a simple vb app. where you focus on text box scan with barcodereader which would push the value into the textbox and have corresponding event for when a value is entered to look up company ccode in DB or flat file table.
0
 
LVL 2

Author Comment

by:jonathonberg
ID: 34103050
Ok - I need to provide more detail:  The application we are scanning into is Sage 50 accounts.  We are scanning in barcodes on items to make up an invoice on trade counters.  This program is "closed" and will not allow modification.  

We need to read the supplier barcode, use a utility to convert this code into a valid stock code using a lookup table and enter that stock code as if it had been keyed.  So if the barcode was "123" we might want to trasnlate this to "XYZ" input into the Sage 50 application.

We are happy and competant to write a memory-resident .Net utuility to perofrm the lookup and to push the final result into the keyboard buffer - my question is how do we intercept the barcode read and stop it going into the keyboard buffer?

P.S. The customer wants a USB or keyboard wedge scanner gun plugge dinto a PC, not a terminal or ODA (we know we could do it that way)

Thank you.
0
 
LVL 25

Accepted Solution

by:
kode99 earned 500 total points
ID: 34118396
Many barcode scanners can be programmed to do some formatting on the data scanned.  This usually includes things like adding a prefix and suffix to the scan.  You would need to check the manual for any scanner you want to use for the details.

With this you just need to intercept keystrokes to Sage.  You do nothing until the prefix character shows up then you trap and buffer the characters until the suffix shows up.  Then do your lookup and inject the keystrokes for your translated code into Sage.  The keystrokes from the scanner are coming fast so as long as your lookup is fast it will be seamless to the user.

By the sound of it you probably have the skills available for hooking events but if not here's a easy way to get it done,

http://www.codeproject.com/KB/winsdk/messagespy.aspx

Reference on hooking in .net,

http://msdn.microsoft.com/en-us/magazine/cc188966.aspx

0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Unifi AP 4 77
Auto-indent certain lines in Notepad++ 10 75
Activate recording on Zavio B7510 5M Outdoor Bullet IP camera 1 43
Guidelines for building a gaming PC 17 42
Great sound, comfort and fit, excellent build quality, versatility, compatibility. These are just some of the many reasons for choosing a headset from Sennheiser.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

810 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