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)"