It has served me well until lately. When I use it like this (pressing "q"):
Code:
ON BREAK ( ECHO foo & QUIT )
DO FOREVER
DELAY /M 1
SET key=0
INKEY %%key
SWITCH %key
CASE q
GENBREAK
ENDSWITCH
ENDDO
it's iffy whether or not I see "foo" (maybe 60/40 in favor of not seeing it). Why is it iffy? And how might I improve GENBREAK so it's reliable in this situation? Thanks.
|Code:
|---------
|ON BREAK ( ECHO foo & QUIT )
|DO FOREVER
| DELAY /M 1
| SET key=0
| INKEY %%key
| SWITCH %key
| CASE q
| GENBREAK
| ENDSWITCH
|ENDDO
|---------
|it's iffy whether or not I see "foo" (maybe 60/40 in favor of not seeing it). Why is it iffy? And how might I improve GENBREAK so it's reliable in this situation? Thanks.
I should have added that the batch file always ends.
---- Original Message ----
From: vefatica
...
|| it's iffy whether or not I see "foo" (maybe 60/40 in favor of not
|| seeing it). Why is it iffy? And how might I improve GENBREAK so it's
|| reliable in this situation? Thanks.
|
| I should have added that the batch file always ends.
If the batch file is run in a transient or piped-to instance of TCC, the issue could be timing: the instance disappears before the message in ECHO becomes visible, due to buffering.
Regardless, I think you could use "ON CONDITION" without the need for GENBREAK!
--
Steve
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.