Inkey and Sleep
Mike Fedko
filepro at adelphia.net
Tue Apr 12 05:12:35 PDT 2005
In bob's example, try putting show""<xx after line#5. If you press
numlock, capslock,etc... as I've mentioned previously, the processing does
stop. If ENTR is pressed after this, you will see that xx eq ERR. I wish
someone else would try Bob's example and post back so I know I'm not nuts. I
don't care about the ERR, but I do, the stopped Processing.
Mike Fedko
----- Original Message -----
From: "Bob Stockler" <bob at trebor.iglou.com>
To: "filePro Mailing List" <filepro-list at lists.celestial.com>
Sent: Thursday, April 14, 2005 2:16 PM
Subject: Inkey and Sleep
> 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).
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
More information about the Filepro-list
mailing list