Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with FGETS() for COMM port
Message
De
08/08/1998 10:12:50
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Help with FGETS() for COMM port
Divers
Thread ID:
00125028
Message ID:
00125028
Vues:
69
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.
Répondre
Fil
Voir

Click here to load this message in the networking platform