FoxPro command wait
Sorry, but this help information has still to be written! The topic was inserted already to be available for a respective call from Help&Info or a Tool&Task form.
If you have Tool&Task installed and need an info, use the Email button from this Help&Info page and we will prepone this topic.
Thank you for your understanding!
Tool&Task Team
***************************** | |
* Tool&Task example program * | |
* wait() * | |
* last compile: 29.10.2020 * | |
***************************** |
local l_want, lkey, lmess, ln, ldone | |
l_want = 1 |
&& change the number to |
do case |
&& go through the cases |
case l_want = 1 | |
wait "press any key (x-key will beep)" to lkey window | |
if lower(lkey) == "x" | |
?chr(7) |
&& chr(7) = 'beep' |
endif |
&& crlf is defined in TT as |
case l_want = 2 |
&& the string chr(13) + chr(10). |
lmess = "this window will stay"+crlf |
&& it causes a new line |
lmess =lmess+"on the screen for"+crlf |
&& crlf=chr(13)+chr(10)=Carriage return LineF |
lmess = lmess + "5 seconds or be re-" + crlf | |
lmess = lmess + "moved by a keystroke" | |
wait lmess window timeout 5 | |
case l_want = 3 | |
lmess = "this program will beep 5 times and then close the wait window" | |
wait lmess window nowait | |
for ln = 1 to 5 | |
?chr(7) | |
endfor | |
wait clear | |
case l_want = 4 | |
lstring = "ABCDEFG" | |
for ln = 1 to len(lstring) | |
ldone = .f. | |
do while not ldone | |
wait "please press '" + substr(lstring, ln, 1) + "'-key" to lkey window | |
if upper(lkey) # substr(lstring, ln, 1) | |
?chr(7) | |
wait "this is not what you were expected to do" window timeout 3 | |
else | |
ldone = .t. |
&& this will end the while loop |
endif | |
enddo | |
endfor | |
endcase |