UPC or Barcode Scanners

Sarah sarahr at genesearch.com.au
Wed Nov 6 21:43:01 EST 2002


Yes, I have used a Rev app to get barcode data. I'm not sure if my 
reader is typical but it works as a keyboard wedge so generates data 
just like a keyboard. The trick is to find the identifier at the end of 
the scan.

Here are the 2 handlers that work for me:

local readCodes

on keyDown theKey
if readCodes = true then
     put theKey after fld "Barcode"
   else
     pass keyDown
   end if
end keyDown

on rawKeyDown theKey
   if theKey = 65293 and readCodes = true then
     send mouseUp to btn "Process Barcode"
   else
     pass rawKeyDown
   end if
end rawKeyDown

readCodes is just a flag that is set depending on whether I want to 
read from the scanner or not.
The keyDown gets the data letter by letter, but the rawKeyDown gets the 
end of line marker, in my case 65293. You'll need to test what your 
scanner is producing by getting the rawKeyDown to display whatever if 
receives, then you can use that to get your program to handle the 
complete barcode.

Cheers,
Sarah


On Monday, November 4, 2002, at 07:55  am, Roger.E.Eller at sealedair.com 
wrote:

>
> Has anyone used Revolution to capture input from barcode 
> readers/scanners
> connected via serial or USB? I have tried without success. The unit 
> beeps,
> telling me the UPC is valid, but I get no text in my field. I have 
> tried
> the examples on opening and reading from serial ports in the Rev help. 
> I
> also tried the TEST SERIAL Rev app that was provided here on the list
> several months ago. Is there a preferred type or brand of UPC scanner 
> that
> works best with Rev? Is there some sample scripts available that does 
> this
> sort of thing that I could use as a guide/tutorial?
>
> Kind Regards,
> Roger Eller
> roger.e.eller at sealedair.com





More information about the use-livecode mailing list