Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with INKEY()
Message
De
29/01/2001 10:01:05
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Titre:
Problem with INKEY()
Divers
Thread ID:
00469686
Message ID:
00469686
Vues:
31
I have on old system in Fox 2.6a which is basically an unattended processor. It checks if there are any pending records and prints them to a Winfax queue, but drops into a "sleep" mode when there aren't any records. At the end of the 60 second wait, it checks if the user pressed "q". If so, the program drops out of loop and returns to the menu.

I can't duplicate this, but my user says that the system will go into sleep mode for maybe 4 or 5 minutes, and then it drops out to the menu. I've looked at the code and nothing jumps out at me. Any suggestions? TIA

Here's the code:

ll_cont = .T.

Do while ll_cont
DO WHILE .NOT. (ln_resp = ASC("Q") .OR. ln_resp = ASC("q"))
*-- Set timer to 60 seconds
ln_resp = INKEY(60)
GOTO TOP

IF .NOT. EOF()
EXIT
ENDIF
ENDDO

*-- Here because "Q" pressed, user wants to quit
IF ln_resp = ASC("Q") .OR. ln_resp = ASC("q")
ll_cont = .F.
EXIT
ENDIF

*-- print to winfax

ENDDO
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform