Qbasicnews.com

Full Version: Help with input
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have recently aquired a barcode scanner and was wondering if (and how) QBasic would except input from the Communications Port (COMM1, COMM2, or COMM5). Your help would be greatly appreciated.
I've written a program using a barcode scanner, but it's input via a wedge. What type of scanner do you have that needs to go thru the communications port?
Just a side note, Mike -> You're "Location" isn't your website - it's where you are. And also the URL is a little long, so it scrunches everything up. Move your website link to your signature, and remove the link from your "Location" (do all that within your Profile page).
You can use the COM ports using the OPEN COM statement. Look in the QB help for details, it's all in there. Smile
I recently had a very similar question about barcode scanners hooking up to a COMport.

You can use OPEN statement in QB to read data from the port, and use it in your QB program, and it'll work fine using OPEN command. Check Help for it. However, if you want to be able to use the barcode scanner in a windows application, for example Notepad, or any other windows program, this method won't work!

If you want to be able to use your COMport-attached barcode scanner to send data as if it were typed in through the keyboard, you're going to have to use VB to do it. Read this thread for more information, including the code that finally did it:

http://forum.qbasicnews.com/viewtopic.php?t=4405

*peace*

Meg.