Welcome!

By registering with us, you'll be able to discuss, share and exchange private messages with other members of our community.

SignUp Now!

Console not redrawn in BTM or with multiple commands

May
12,625
152
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?
 
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
 
oops my mistake delay in bat cause a wait before .. execstr draws console then waits
omg i need glasses ignore
 
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

Back
Top