About barcode scanner - Forum

Forum Navigation
You need to log in to create posts and topics.

About barcode scanner

Hello

I try to use a normal barcode scanner that is working like a normal keyboard. But when i receive the 6 characters barcode to a text entry and I put my code to "text change" I found that the code work 6 times. Like receive one character every time.

Do you have any solution for that? Or maybe a plugin?

 

Best regards

Hi @sakismor,

You don't need any plugin.
If you use "text change" to process the code, it will be executed everytime the text changes and that's 6 times: once for each character because they are entered one by one (although very quickly).
Try using a "OK" button near the Input Text to process the data instead.
Best regards.

Quizás puedas usar un Timer y llámalo cada vez que escanees.

Tex change:

StrLen "[barcode]" "[len_barcode]"
If "[len_barcode]" ">" "0"
TimerStart "Timer" "500"
endif

 

Timer Object:

dbpExecSQL "db" "SELECT * FROM Inventario WHERE barcode=[barcode]" ""
TimerStop "Timer"
SetVar "[barcode]" ""