Solved

Barcode Scanner string conversion

Posted on 2010-11-10
4
741 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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Oracle Errors 11 89
C# Windows Form Navigation - Total Beginner 9 94
recommended printer for small business office.. 4 25
Looking for reading material 2 45
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?

751 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