Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with FGETS() for COMM port
Message
From
08/08/1998 10:12:50
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Help with FGETS() for COMM port
Miscellaneous
Thread ID:
00125028
Message ID:
00125028
Views:
68
I am writing a program in Fox 2.5 for DOS to run in a hand held computer with a serial wand scanner attached. I want to activate the scanner, and allow the user to scan a series of bar codes. When scanning has been completed, I want them to be able to press a key on the computer keyboard and have the function stop.

I am using the FOPEN('COM1,0) command to open the serial port. I then create a loop containing the FGETS command to get the data from the scanner. This works great except that I am always sitting on the FGETS statement waiting for more data and cannot see keystrokes from the keyboard.

I have tried using the ON KEY function, but the key strokes do not
interrupt the FGETS function. After completing the next scan, the ON KEY routine is processed. I'm open for suggestions on how to resolve this problem.

When this application is in use, the user is away from the office. I
could obviously put a special 'QUIT' bar-code on the hand held and scan that when scanning is complete, but every other selection on the hand held is via the keyboard, and I would like to follow the same conventions if possible.
Reply
Map
View

Click here to load this message in the networking platform