PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD20] Stop program while getting list of barcodes from handheld scanner
[WD20] Stop program while getting list of barcodes from handheld scanner
Iniciado por guest, 27,oct. 2015 15:48 - 3 respuestas
Publicado el 27,octubre 2015 - 15:48
I feel like this should be easy, but my brain isn't working well this morning.

I have a usb barcode scanner that has an offline mode. It will store all the barcodes I've scanned. When I get back to the computer I scan a barcode that tells the scanner to unload all the stored barcodes. How can I do this in a WinDev program where nothing else executes until the scanner is done unloading while also keeping the user from clicking a different program and possibly breaking the procedure to get the list of barcodes? I would like to get all the stored barcodes in an array.
Publicado el 27,octubre 2015 - 16:32
Hi Curtis,

The easiest way to do this is -

1. When testing, scan the barcode to get the "Unload" barcode.
2. Save this in a variable.
3. Let the users enter anything they want.
4. Put some code in the edit_input that says

If edit_input = variable THEN
perform routine
ELSE
returntocapture(edit_input)
END

I have used this on door entry systems and it works very well.

Regards,

Mike
Publicado el 27,octubre 2015 - 16:34
Hi Curtis,

A variation on Mike's solution; if your barcode reader works like a normal barcode reader in this "special" mode, I'd start by experimenting with a multi-line edit control/field (on or off screen depending on whether you want the user to see the barcodes loading?), then put the (focus) cursor into the edit control, display a modal message box (saying something like "Loading barcodes - please wait..."), so the user can't "click away". Then as long as your barcode reader separates the barcodes it's sending with a CR, you can then use the StringToArray function to load your array?
Publicado el 28,octubre 2015 - 17:28
The user can still click on a different window, say a browser url bar, and then that would get the remaining barcodes. Maybe I'm trying to hard to code this. Maybe it should be up to the end user to not click anywhere else.