[Gambas-user] usb codebar reader how to handle events!?
Jack
jscops at ...11...
Wed Dec 23 17:15:52 CET 2015
Le 23/12/2015 16:59, PICCORO McKAY Lenz a écrit :
> now continues with strange petitions:
>
> now i have a usb metrologic code bar reader, of course in each plug and
> play changes the usb node, that was solved!!
>
> My problem are now that i want to detect when the input comes from this
> device and not from the keyboard!
>
> the reader returns chars! i can configure to return a start char and end
> char, but make me depends on a pre-configuration
>
> i want something like "if inputX_read " etc etc
>
> by example, for serial port if i have Sport the event when i have data are
> _Read..
>
> how can i made some thing similar with this device usb
>
> can manage as a extra keyboard, if this are, how can i diference two
> keyboards (one the standar keyboard the other the codereader)
>
> a portion oof code will be helpfull
>
Hello,
a barcode reader does not need to be declared in the system. It is
automatically recognized.
you must configure your reader with a preamble. For example with a *.
Then when you get the barcode, you control the first character is a *
If Left$(textbox.Text) = "*" Then
Barcode = true
Textbox.Text = Mid$(Textbox.Text, 2, Len(Textbox.Text))
what you want with Textbox.text
endif
Jack
More information about the User
mailing list