PB & Barcode Scanners
PB & Barcode Scanners
Has anyone worked with barcode scanners using PB? Can y'all recommend a library and scanner to use? I don't need anything complex and a hand held would work just fine. I believe the target computer will have a serial port but I'm not 100% certain.
Thanks!
Thanks!
As far as i know, Barcode scanner acts like a keyborad. PB will not know if its a barcode scanner or a keyboard (which is fine, its easy to use it. In practical uses, using tha barcode scanner will be the same for PB as is the user uses the keyboard to insert the prices on the gadgdet).
Also there are some PB libs on PureArea.Net that let some manage of barcode stuff.
Also there are some PB libs on PureArea.Net that let some manage of barcode stuff.
Some scanners like the Symbol LS2208 allow you to drive the scanner in a virtual serial mode. i.e. it converts the USB scanner to a serial scanner, where you can grab the barcode from the configured serial port. Otherwise text wedge mode is the same as typing the characters in yourself. Bare in mind, that the edit control will need focus, otherwise the barcode scanned will just vanish into the ether. All fairly painless with PureBasic.
Colin
Colin
- Rook Zimbabwe
- Addict

- Posts: 4322
- Joined: Tue Jan 02, 2007 8:16 pm
- Location: Cypress TX
- Contact:
The cheaper scanners only have 1 mode. USB scanners can mostly emulate the keyboard or a serial port. Older scanners used to have a keyboard passthrough plug setup. I don't see this as much nowadays.
The best thing to do would be to insist that the user use a USB scanner with keyboard emulation that can read the 3of9 barcodes.
Start and end each barcode with the "*" character in barcode format.
Viola you are managing inventory!
The best thing to do would be to insist that the user use a USB scanner with keyboard emulation that can read the 3of9 barcodes.
Start and end each barcode with the "*" character in barcode format.
Viola you are managing inventory!
You might want to do this, when backtracking to determine whether the bar code was really scanned (accurate) or the user typed it in (liable to mistakes).alokdube wrote:it really should not matter, I mean why do you need to check the source of the input?
there are IP enabled bar code scanners too by the way...
You can simulate this by using a different suffix character. It the user presses the bar code, then Enter, then it was keyboard entered, if it was scanned with say a tab as the suffix then it was scanned by scanner. It's never infallible though.
Colin
-
DarkDragon
- Addict

- Posts: 2348
- Joined: Mon Jun 02, 2003 9:16 am
- Location: Germany
- Contact:
That doesn't work, as you can't direct the barcode scanner if it is functioning as a wedge reader, as you have no way of knowing if the keys are coming from the wedge reader or the keyboard.ricardo wrote:You may direct the barcode scanner to a gadget that is not visible, so nobody can type it there manually.
For manual usage use another gadget, so its easy to know which one was used.
Just one idea, never test it myself.
Colin
The only reason I'd like a way to detect whether it was the keyboard or scanner is because I would like to prevent the user scanning into a string gadget other than the very specific one.
I don't have control over the barcodes so I can't add in special identifiers to handle it in this way.
Mostly it was just an idle wish. If the user accidentally scans the barcode while in a different field, they'll have to back it out. It's for an internal app so I don't worry so much about that.
And the one I purchased is only USB so unfortunately no serial port or otherwise.
I appreciate all the discussion, though. Always good to see thoughts being passed around.
I don't have control over the barcodes so I can't add in special identifiers to handle it in this way.
Mostly it was just an idle wish. If the user accidentally scans the barcode while in a different field, they'll have to back it out. It's for an internal app so I don't worry so much about that.
And the one I purchased is only USB so unfortunately no serial port or otherwise.
I appreciate all the discussion, though. Always good to see thoughts being passed around.
Well, its possible.ColBoy wrote:That doesn't work, as you can't direct the barcode scanner if it is functioning as a wedge reader, as you have no way of knowing if the keys are coming from the wedge reader or the keyboard.ricardo wrote:You may direct the barcode scanner to a gadget that is not visible, so nobody can type it there manually.
For manual usage use another gadget, so its easy to know which one was used.
Just one idea, never test it myself.
per example if you let the user pick a radio button to change the gadget depending on if was manually or using the scanner. Yes, the user can cheat you, but i dont think we are talking about detectivesque code, just a way to make it easily to manage.
In the front GUI there could be a choice to choosee the option barcode scanner or keyboard.
Im sure there are a lot of other possibilities to achieve this.
- Rook Zimbabwe
- Addict

- Posts: 4322
- Joined: Tue Jan 02, 2007 8:16 pm
- Location: Cypress TX
- Contact:


