scrolling region test
Posted: 03 Sep 2024 04:16
Here is a scrolling region test.
Output (shortened to fit):
and when finished:
Saso
Updated: Aacini is the author of the way how ESC gets into a variable. Source updated. See below. Aacini: I am very sorry. This was not intentional.
Code: Select all
@echo off
mode con cols=80 lines=24
cls
REM Aacini's solution (see below for more info regarding this correction)
for /f %%a in ('echo prompt $E^| cmd') do set "ESC=%%a"
echo S C R O L L I N G T E S T
echo %esc%[21;0H======================================================================
echo S C R O L L I N G T E S T
REM set scrolling region lines 10-20
echo %esc%[10;20r
echo %esc%[9;0H======================================================================
for /L %%f in (100,1,120) do echo %%f&timeout /T 1 >nul
echo %esc%[22;0H
Code: Select all
S C R O L L I N G T E S T
======================================================================
100
101
102
103
104
105
106
107
======================================================================
S C R O L L I N G T E S T
Code: Select all
S C R O L L I N G T E S T
======================================================================
111
112
113
114
115
116
117
118
119
120
======================================================================
S C R O L L I N G T E S T
Updated: Aacini is the author of the way how ESC gets into a variable. Source updated. See below. Aacini: I am very sorry. This was not intentional.