Re: [Gambas-user] usb codebar reader how to handle events!?

2015-12-24 Thread Charlie
I can't see how you are supposed to tell if you are typing on a keyboard or
using a barcode reader as they are both USB devices setup to look like a
keyboard. It's probably possible but you'll need somebody who can write code
to read USB ports and understands how they work - That's not me! 
OK let's try another tack. The barcode reader can fire in text at quite a
rate so here is some code that does not rely on any special characters. 
It uses the fact that if there is no new character added to the TextBox in
1/16th of a second then the barcode is read.
BarcodeReader.tar
  



--
View this message in context: 
http://gambas.8142.n7.nabble.com/usb-codebar-reader-how-to-handle-events-tp55079p55095.html
Sent from the gambas-user mailing list archive at Nabble.com.
--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] usb codebar reader how to handle events!?

2015-12-23 Thread PICCORO McKAY Lenz
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

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com
--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] usb codebar reader how to handle events!?

2015-12-23 Thread Jack
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

--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] usb codebar reader how to handle events!?

2015-12-23 Thread PICCORO McKAY Lenz
Errr.. Jack! i have already preconfigured with prefix (an "a") and sufix (a
"z"),

i want without that!, i wnat detect the event itselft!

2015-12-23 11:45 GMT-04:30 Jack :

> 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
>
>
--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] usb codebar reader how to handle events!?

2015-12-23 Thread PICCORO McKAY Lenz
thanks charlie.. currently as i previusly posted, that's was doint! but my
reader does not return "enter" or "carrige return" , only the code that
reads!

by now i can configure with "return" at the end of the read, or with a
prefix and a sufix.. but i want to do not depend on those tricks!

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com

2015-12-23 11:45 GMT-04:30 Charlie :

> The barcode reader will only return the barcode information not the special
> characters that are needed to create it. Once all the barcode is sent the
> barcode reader will send a *Return key*.
> We can use Gambas to check for the *Return key* so we know the barcode has
> been completely read. If you want to see how this works open a spreadsheet
> and read a code into a cell and you will see that if the code is read into
> cell A1 the cursor ends up in cell B1 because of the *Return key*.
> There is no need to program the reader to send any extra characters.
> Here is some code you can use to see how Gambas can handle to reader.
> BarcodeReader.tar
> 
>
>
>
> --
> View this message in context:
> http://gambas.8142.n7.nabble.com/usb-codebar-reader-how-to-handle-events-tp55079p55083.html
> Sent from the gambas-user mailing list archive at Nabble.com.
>
> --
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] usb codebar reader how to handle events!?

2015-12-23 Thread Charlie
The barcode reader will only return the barcode information not the special
characters that are needed to create it. Once all the barcode is sent the
barcode reader will send a *Return key*.
We can use Gambas to check for the *Return key* so we know the barcode has
been completely read. If you want to see how this works open a spreadsheet
and read a code into a cell and you will see that if the code is read into
cell A1 the cursor ends up in cell B1 because of the *Return key*.
There is no need to program the reader to send any extra characters.
Here is some code you can use to see how Gambas can handle to reader. 
BarcodeReader.tar
  



--
View this message in context: 
http://gambas.8142.n7.nabble.com/usb-codebar-reader-how-to-handle-events-tp55079p55083.html
Sent from the gambas-user mailing list archive at Nabble.com.
--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] usb codebar reader how to handle events!?

2015-12-23 Thread Fabien Bodard
hey jack :

Textbox.Text = Mid$(Textbox.Text, 2, Len(Textbox.Text))

Textbox.Text = Right(Textbox.Text, -1)



2015-12-23 20:16 GMT+01:00 PICCORO McKAY Lenz :
> thanks charlie.. currently as i previusly posted, that's was doint! but my
> reader does not return "enter" or "carrige return" , only the code that
> reads!
>
> by now i can configure with "return" at the end of the read, or with a
> prefix and a sufix.. but i want to do not depend on those tricks!
>
> Lenz McKAY Gerardo (PICCORO)
> http://qgqlochekone.blogspot.com
>
> 2015-12-23 11:45 GMT-04:30 Charlie :
>
>> The barcode reader will only return the barcode information not the special
>> characters that are needed to create it. Once all the barcode is sent the
>> barcode reader will send a *Return key*.
>> We can use Gambas to check for the *Return key* so we know the barcode has
>> been completely read. If you want to see how this works open a spreadsheet
>> and read a code into a cell and you will see that if the code is read into
>> cell A1 the cursor ends up in cell B1 because of the *Return key*.
>> There is no need to program the reader to send any extra characters.
>> Here is some code you can use to see how Gambas can handle to reader.
>> BarcodeReader.tar
>> 
>>
>>
>>
>> --
>> View this message in context:
>> http://gambas.8142.n7.nabble.com/usb-codebar-reader-how-to-handle-events-tp55079p55083.html
>> Sent from the gambas-user mailing list archive at Nabble.com.
>>
>> --
>> ___
>> Gambas-user mailing list
>> Gambas-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
> --
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user



-- 
Fabien Bodard

--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user