Restore buffer on exit /b [Closed]
Posted: 16 Nov 2021 13:41
Edit: Please disregard.I had previously turned off the cursor with a terminal escape sequence. The powershell command works fine.
I have a script which changes the console screen height and width periodically with the mode con command. I'd like to reset it back to the defaults on exit /b. I can use this:
If I do this, I lose the default buffer. Is there any way to restore the buffer?
I can use powershell:
However, I find that my cursor stops blinking.
[Win 10 Pro]
I have a script which changes the console screen height and width periodically with the mode con command. I'd like to reset it back to the defaults on exit /b. I can use this:
Code: Select all
mode con: cols=120 lines=30
I can use powershell:
Code: Select all
powershell -command "&{$w=(get-host).ui.rawui;$w.buffersize=@{width=120;height=9001};$w.windowsize=@{width=120;height=30};}"
[Win 10 Pro]