Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with INKEY()
Message
From
09/08/1999 02:11:15
 
 
To
08/08/1999 18:46:24
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00251306
Message ID:
00251355
Views:
25
Hi Bernard..

Here is an example that works...

DO WHILE
*-- Wait 0.5 second for a keypress
nWait = INKEY(0.5,"H")
IF nWait <> 0
*-- Key pressed, EXIT loop
EXIT
ENDIF

Some code....

ENDDO

>I have this problem, with the following code:
>
>bb = INKEY(20,"H")
>IF bb = nkeyvar
> .....
> .....
> . do some code
>ENDIF
>
>This is in a DO While loop that gets executed about once every 20 seconds. The idea is to allow the user to break out of the loop if needed by pressing a set of keys.
>
>This works fine for a while and then I get the error
>
>"Function argument value, type, or count is invalid" ERROR#11 at the line where the INKEY command is evaluated.
>
>Before I forget this is in FOXW2.6a
>
>Is this some bug or what is going on??
>
>"bb" is just a local variable and should not cause this error.
>
>Any ideas would be greatly appreciated.
>
>
>Thanks
>
>Bernard
Benn Kjaer
MS Certified Professional - Visual Foxpro

"There is something rotten in the state of Denmark"
"Why make user-friendly programs, when there aren’t any friendly users :o)"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform