Inkey and Sleep
Bob Stockler
bob at trebor.iglou.com
Thu Apr 14 11:16:31 PDT 2005
I no longer have any of the tread to which this belongs,
but earlier I suggested a solution to the last problem
posed in it, which was to test for the "acceptable" key
strokes and loop if inkey didn't return one of them.
At the time I didn't have the time to post an example of
what I meant, but jut got a few free minutes and wrote one.
I'm not sure how the original poster was using his routine,
but this shows how to prevent the hangup he experienced:
@MENU If:
1 Then: declare Lets ; Lets="abcdefghijklmnopqrstuvwxyz"
2 Then: declare Nums ; Nums="0123456789"
3 Then: declare Skys ; Skys="[ENTR][HELP]"
4 Then: sh=" 1" ; j="1" ; show popup "\n Waiting a while. \n "
Loop If:
5 Then: show sh ; sleep "1000" ; xx(1,*)=inkey
If: NOT Lets co xx and NOT Nums co xx and NOT Skys co @sk
6 Then: sh=sh { j ; goto Loop
7 Then: clearp ; show popup "\n Done Waiting. \n "
8 Then: show "Press \KZ to Quit: " ; wk=waitkey ; exit
Note that INKEY will hold _only_ the key that was last pressed
before it's executed.
Bob
--
Bob Stockler - bob at trebor.iglou.com
Author: MENU EDIT II - The BEST Creator/Editor/Manager for filePro User Menus.
Fully functional (time-limited) demos available by email request (specify OS).
More information about the Filepro-list
mailing list