Alaska Software Inc. - barcode
Username: Password:
AuthorTopic: barcode
Edgar Borger barcode
on Tue, 14 Sep 2021 11:32:21 -0300
Hi all,

is there a way to identify if a code was scanned or typed ?
I have a barcode scanner connected to an USB port, and the input goes to 
the keyboard buffer, so my program receives the data and process it, all 
is fine, but now my customer wants to know if the code was typed by the 
operator or scanned, is there a way to check this ?

thank you all for your input.
Best regards,
Edgar
Andreas Gehrs-Pahl
Re: barcode
on Tue, 14 Sep 2021 19:51:24 -0400
Edgar,

>is there a way to identify if a code was scanned or typed ?

Not if you use the keyboard buffer method. You would have to access the 
scanner directly or listen to events directly, probably via API calls, as 
the Xbase++ program doesn't know how the data got into the keyboard buffer.

The easiest way would probably be to have the scanner send a start and/or 
stop code (prefix/suffix) that identifies the text as barcode input.

LMGTFY:

https://social.msdn.microsoft.com/Forums/vstudio/en-US/5eb0407e-95fc-4440-8f79-2daa841fee0e/distinguishing-keyboard-input-from-barcode-scanner-input?forum=netfxbcl
https://stackoverflow.com/questions/5088374/how-to-check-if-user-input-is-from-barcode-scanner-or-keyboard
https://stackoverflow.com/questions/45959453/how-to-check-whether-the-input-is-given-by-barcode-scanner-or-by-soft-keyboard

Hope that helps,

Andreas

Andreas Gehrs-Pahl
Absolute Software, LLC

phone: (989) 723-9927
email: Andreas@AbsoluteSoftwareLLC.com
web:   http://www.AbsoluteSoftwareLLC.com
[L]:   https://www.LinkedIn.com/in/AndreasGehrsPahl
[F]:   https://www.FaceBook.com/AbsoluteSoftwareLLC
Edgar Borger Re: barcode
on Wed, 15 Sep 2021 12:51:23 -0300
Hi Andreas,

thanks for the tips, I will try.

Best regards,
Edgar


Em 14/09/2021 20:51, Andreas Gehrs-Pahl escreveu:
> Edgar,
> 
>> is there a way to identify if a code was scanned or typed ?
> 
> Not if you use the keyboard buffer method. You would have to access the
> scanner directly or listen to events directly, probably via API calls, as
> the Xbase++ program doesn't know how the data got into the keyboard buffer.
> 
> The easiest way would probably be to have the scanner send a start and/or
> stop code (prefix/suffix) that identifies the text as barcode input.
> 
> LMGTFY:
> 
> https://social.msdn.microsoft.com/Forums/vstudio/en-US/5eb0407e-95fc-4440-8f79-2daa841fee0e/distinguishing-keyboard-input-from-barcode-scanner-input?forum=netfxbcl
> https://stackoverflow.com/questions/5088374/how-to-check-if-user-input-is-from-barcode-scanner-or-keyboard
> https://stackoverflow.com/questions/45959453/how-to-check-whether-the-input-is-given-by-barcode-scanner-or-by-soft-keyboard
> 
> Hope that helps,
> 
> Andreas
>
Jan EscholtRe: barcode
on Wed, 15 Sep 2021 19:12:40 +0200
Hi Edgar,

I count the time from the first character to the last. And if is less 
than a specific time this can not be typed manually. So it has to be a scan.

Jan

Am 14.09.2021 um 16:32 schrieb Edgar Borger:
> Hi all,
> 
> is there a way to identify if a code was scanned or typed ?
> I have a barcode scanner connected to an USB port, and the input goes to 
> the keyboard buffer, so my program receives the data and process it, all 
> is fine, but now my customer wants to know if the code was typed by the 
> operator or scanned, is there a way to check this ?
> 
> thank you all for your input.
> Best regards,
> Edgar
Edgar Borger Re: barcode
on Wed, 15 Sep 2021 15:54:09 -0300
Tks Jan, I will run some tests...



Em 15/09/2021 14:12, Jan Escholt escreveu:
> Hi Edgar,
> 
> I count the time from the first character to the last. And if is less 
> than a specific time this can not be typed manually. So it has to be a 
> scan.
> 
> Jan
> 
> Am 14.09.2021 um 16:32 schrieb Edgar Borger:
>> Hi all,
>>
>> is there a way to identify if a code was scanned or typed ?
>> I have a barcode scanner connected to an USB port, and the input goes 
>> to the keyboard buffer, so my program receives the data and process 
>> it, all is fine, but now my customer wants to know if the code was 
>> typed by the operator or scanned, is there a way to check this ?
>>
>> thank you all for your input.
>> Best regards,
>> Edgar
Andreas Gehrs-Pahl
Re: barcode
on Fri, 17 Sep 2021 19:36:19 -0400
Jan,

>I count the time from the first character to the last. And if is less 
>than a specific time this can not be typed manually. So it has to be a scan.

Or a (copy and) paste operation.

Andreas

Andreas Gehrs-Pahl
Absolute Software, LLC

phone: (989) 723-9927
email: Andreas@AbsoluteSoftwareLLC.com
web:   http://www.AbsoluteSoftwareLLC.com
[L]:   https://www.LinkedIn.com/in/AndreasGehrsPahl
[F]:   https://www.FaceBook.com/AbsoluteSoftwareLLC
Edgar Borger Re: barcode
on Mon, 20 Sep 2021 14:36:02 -0300
in my case, not likely..... but yes, in theory it could be....



Em 17/09/2021 20:36, Andreas Gehrs-Pahl escreveu:
> Jan,
> 
>> I count the time from the first character to the last. And if is less
>> than a specific time this can not be typed manually. So it has to be a scan.
> 
> Or a (copy and) paste operation.
> 
> Andreas
>