Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with INKEY()
Message
From
29/01/2001 10:01:05
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Title:
Problem with INKEY()
Miscellaneous
Thread ID:
00469686
Message ID:
00469686
Views:
32
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
Next
Reply
Map
View

Click here to load this message in the networking platform