Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I tell what the last pressed key is?
Message
 
To
08/05/2001 08:16:47
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00504620
Message ID:
00504645
Views:
18
>Ron,
>inkey(0.1) means wait for a key for 0.1 seconds at max, not wait 0.1 secs before checking a key. You'd need a loop as you did to enforce it, however using seconds() is dangerous if this routine could be running around midnight (SECONDS() - pnseconds > pntimeout would be true about 24 hrs later).
>

Also, you can use
pnseconds = DATETIME()
IF DATETIME() - pnSeconds > pntimeout
...

or for more precise values (or in FoxPro 2.5)
pnseconds = VAL(SYS(1)) * 86400 + SECONDS()
instead of DATETIME()
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform