Console not redrawn in BTM or with multiple commands

May 20, 2008
12,035
127
Syracuse, NY, USA
If your background color is color 0 (black) this BTM (TEST.BTM) will change color 0 to grey and the console will be re-drawn (with a grey background). If your background color is not 0, change the value of i appropriately.

Code:
set i=0
set r=80
set g=80
set b=80
echos ^e]4;%i;rgb:%r/%g/%b^e

But if I do either of these:

1. put delay 3 at the end of TEST.BTM​
2. execute TEST.BTM & delay 3

the console will not be re-drawn until after the delay.

What's going on there?
 
Aug 9, 2009
293
1
hmm I dont find your explanation in the result. i change g=40 b=20 just so i can see whats going on
and it appears on my end to draw the console then wait
 
Aug 9, 2009
293
1
oops my mistake delay in bat cause a wait before .. execstr draws console then waits
omg i need glasses ignore
 
May 20, 2008
12,035
127
Syracuse, NY, USA
This probably has something to do with an apparent bug I found in CONHOST's handling of that particular control sequence. It seems the terminating ESC is not properly disposed of. It remains in some buffer and somehow signals CONHOST that there's more to come ... then it eats the next character. For example, if I do this

Code:
set i=0
set r=80
set g=80
set b=80
echos ^e]4;%i;rgb:%r/%g/%b^e
echo foo
delay 3

the background change happens immediately and "oo" appears in the console. It can be worked around by echoing, instead of "foo", something innocuous, like %@char[8].
 

Similar threads