Strange behaviour with ansi sequence
Posted: 12 Nov 2018 23:05
Bonjour everyone. I recently found out bout ansi escape sequences and I found this strange behaviour.
I have this code:
It should make the background grey. However, it seems like only the text's background is grey.
What's more strange is that after inserting a CLS after the sequence, the whole background turns grey (expected behaviour)
Why is that? Another strange thing is that I can't seem to replicate the behavior after opening the file; I can't revert it back to black with "only grey background only letters" after I clear the screen. Is there an explanation on why this happens?
I have this code:
Code: Select all
@echo off
for /f %%A in ('echo prompt $E^| cmd') do set "ESC=%%A"
echo %ESC%[100m
pause