Solved

Barcode Scanner string conversion

Posted on 2010-11-10
4
749 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Make the most of your online learning experience.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Simple Linear Regression
Six Sigma Control Plans

624 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