UPC or Barcode Scanners
Roger.E.Eller at sealedair.com
Roger.E.Eller at sealedair.com
Thu Nov 7 09:33: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...
>> ... ... ...
>> 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
Sarah,
Thanks for the code! Would you consider submitting a simple stack to the
Rev site (user contributions) containing your working script and maybe a
single text field. That would be a wonderful addition, and would be very
useful to many of us I'm sure. Thanks again.
Roger Eller
roger.e.eller at sealedair.com
More information about the use-livecode
mailing list