Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
miskox
- Posts: 630
- Joined: 28 Jun 2010 03:46
#1
Post
by miskox » 29 Jan 2021 13:08
I wanted to (for fun) have a DOS window of size LINES=1, then display some text, expand the window to LINES=2, display more text etc. (so dynamically increase the window size).
Here is the code:
Code: Select all
@for /L %%f in (1,1,30) DO @mode CON: COLS=80 LINES=%%f&@echo THIS IS IT
And the result is not as expected because MODE clears the screen.
Instead of
I have
For fun only. Not really of any use (at the moment).
Saso
-
jfl
- Posts: 226
- Joined: 26 Oct 2012 06:40
- Location: Saint Hilaire du Touvet, France
-
Contact:
#2
Post
by jfl » 29 Jan 2021 14:58
Could it be that the 'mode con' moves the cursor to the top left corner every time?
-
Jer
- Posts: 177
- Joined: 23 Nov 2014 17:13
- Location: California USA
#3
Post
by Jer » 29 Jan 2021 16:08
This produces a similar effect, increasing the window size with each line of text, but the screen is cleared with noticeable flicker before displaying each set of lines.
Code: Select all
@echo off
@for /L %%f in (1,1,31) DO @mode CON: COLS=80 LINES=%%f&for /L %%g in (1,1,%%f) DO @echo THIS IS IT
Jer