Re: Regarding the status bar/vt100 codes

From: Barid Bel Medar (icarus@berkshire.net)
Date: 07/01/96


On Mon, 1 Jul 1996, ed wrotniewski wrote:

> I got the codes from the usenet, but I've been trying to figure out
> something. Now I know how to place the cursor in a specific screen
> position... but... how do i tell the terminal that it is only X number of
> lines long (the screen that is). Ever notice if yer on a mud with a status
> bar, then break out of the mud without quitting, that the status bar is
> still there, and stays stationary, so your screen is shortened? I cant get
> this effect to work. If I say put the status bar at line 24, then go back to
> 23 and start printing, it writes over the status bar and scrolls as usual.
> What's the damn code I am missing to 'shrink' the screen, if that is what
> it's doing.

This is really the wrong place for discussing VT100 control codes.  But 
because if I don't answer, someone else will (and might be wrong and 
elicit a reply ;p), I may as well.

I believe what you're looking for is "Scrolling Region," on the DEC VT100 
Reference Card.  Try this:

ESC[Pt;Pbr

Pt is the number of the top line of the scrolling region; Pb is the 
number of the bottom line of the scrolling region and must be greater 
than Pt.  (The default for Pt is line 1, the default for Pb is the end of 
the screen)

i.e.,

ESC[1;23r

That should give you the desired effect.  Note that you may have to do an 
ESC[1;24r to restore the screen to normal before updating the status line.

To do "window switching," i.e., have one window from (1,1) to (1,23) and 
one from (1,24) to (80,24), use this command in conjunction with the 
save/restore cursor and attributes commands.  (I believe that these 
commands apply only to VT100's and above, NOT to regular ANSI terminals.)

Save cursor and attributes    ESC7
Restore cursor and attributes ESC8

Although similar to the regular save/restore cursor position commands for 
ANSI, your players on 2400 baud modems (if there are any) will thank you 
for using these; two characters, as opposed to who knows how many (after 
all, you want the status line to be a different color than everything 
else).

I'd love to give you the location of where I got this, but I don't have 
it right now.  Try going to your favorite (non-Yahoo) web searching 
location and look for vt100, reference, card, terminal, digital, ansi.  
That should put this file (at an ftp site) at the top of the list.

------------------------------------------------------------------
Barid Bel Medar                               icarus@berkshire.net
Knights of the Cosmos            Shayol Ghul Resort and Health Spa
------------------------------------------------------------------
"I  am  returning  this otherwise good typing paper to you because
someone has printed gibberish all over it and  put  your  name  at
the top." - English Professor, Ohio University
------------------------------------------------------------------



This archive was generated by hypermail 2b30 : 12/07/00 PST