barcode scanner

kee nethery kee at kagi.com
Tue Nov 30 10:16:46 EST 2004


On Nov 29, 2004, at 10:02 AM, Frank D. Engel, Jr. wrote:

> Since the barcodes rarely use letters other than a possible 'X' (ISBN 
> #s), one workaround might be to create a 'simulated' numeric keypad on 
> the letter keys, then trap these and handle them specially for your 
> purposes (with a keyDown handler); for example:
>
> Y=7   U=8   I=9
> H=4   J=5  K=6
> N=1   M=2  ,=1
> <space>=0

We create bar codes with letters and when the character is outside the 
barcode range, we use "%" to escape to a hex version of ascii. Thus

kee%40kagi.com

is my email address in the barcode. Software converts it back to the 
characters. This lets us do full 256 char ascii. Also, because we 
encode more than the normal number of characters for a single bar code, 
we have the first character in each barcode be a line number. So as bar 
codes are getting scanned, the code puts the data in the correct order 
and when all lines are scanned (the first line details how many lines 
are to be expected) we strip the line numbers, concatenate the chars 
convert the escape chars, and then transfer the data into the 
appropriate places. We scan 20 to 30 bar codes when all the data is 
encoded in bar code.

Kee



More information about the use-livecode mailing list