Inkey and Sleep
Bob Stockler
bob at trebor.iglou.com
Fri Apr 15 09:45:19 PDT 2005
On Tue, Apr 12, 2005 at 08:12:35AM -0400, Mike Fedko wrote:
|
| 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.
I added: show("2","5") xx at the end of line 5 of my table.
The following keys broke out of the loop because they put
these values into xx:
F11 - W
F12 - X
End - F
Insert - L
Taking those letters out of the assignment to the variable
"Lets" kept those keys from breaking out of the loop.
On SCO OSR 5.0.6 typing one Esc caused the process to pause
while filePro waited for the second Esc, after which it
resumed. Removing "[ENTR]" from the acceptable special keys
list allowed also pressing Enter in order to resume after a
pause caused by pressing just one Esc.
Typing the Caps Lock and Num Lock keys did nothing, nor did
any of the keys I thought to test.
Bob
| ----- 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
|
| _______________________________________________
| Filepro-list mailing list
| Filepro-list at lists.celestial.com
| http://mailman.celestial.com/mailman/listinfo/filepro-list
--
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