MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

Re: Ansi Escape codes





On Fri, 8 Mar 1996, Kipp the Kidd wrote:

> At 10:23 PM 3/7/96 PST, slayer@kaiwan.com wrote:
> Actually, the code is with a capitol J.  ESC[2J.  That might be why
> TinyFugue doesn't like it.
> 
> Here are the codes I can remember:
<SNIP>
Okay, here's the whole list of escape codes from alt.ascii-art:
>From news-2.csn.net!csn!decwrl!nntp.crl.com!acara.snsnet.net!HiWAAY.net!imci2!newsfeed.internetmci.com!uwm.edu!spool.mu.edu!vms.csd.mu.edu!3HF2FISHA Mon Jan 29 09:02:15 1996
Path: news-2.csn.net!csn!decwrl!nntp.crl.com!acara.snsnet.net!HiWAAY.net!imci2!newsfeed.internetmci.com!uwm.edu!spool.mu.edu!vms.csd.mu.edu!3HF2FISHA
From: 3hf2fisha@vms.csd.mu.edu (Andrew L. Fish)
Newsgroups: alt.ascii-art.animation
Subject: ASCII animation help
Date: 25 Jan 1996 22:46:18 GMT
Organization: Marquette University - Computer Services
Lines: 107
Message-ID: <0099CECD.1CDEBDD9@vms.csd.mu.edu>
Reply-To: 3hf2fisha@vms.csd.mu.edu
NNTP-Posting-Host: vmsb.csd.mu.edu

I haven't see any (new) animations around here lately, so I thought I'd repost
my help file.  I too am guilty for not (ever) taking the time to create any
good animation, but maybe this will inspire someone....

First you have to have an understanding of escape codes.  These are the
essential part of animations.  Without them, your animations won't work.
To create the actual "escape" character varies with different systems.  The
ones I know are:

UNIX (vi editor)  : ctrl-v , then press the "esc" key (in insert mode)

VAX (eve editor)  : ctrl-v , then press the "esc" key

MSDOS editor      : ctrl-p , then press the "esc" key

after you have the initial character, there are several codes you can enter to
manipulate the text and cursor.  Here is a list of the codes that I know. 
These are to directly follow the "escape" character.  Also note that in an
animation every code must have a preceding "escape" character.

(this list was compiled by someone else...not me...but here it is)

 Note that the case of the characters after the [ is important.  That is, 
 [4a won't move the cursor, and [1;20R won't set any scroll regions)
 (from the vt220 reference book)

 Random Cursor Access on VT220 terminals.

[xA       move up x lines, same col.
[xB       move down x lines, same col.
[xC       move right x columns, same line.
[xD       move left x columns, same line.
E         locates at first spot next line.
[x;yH     locates at row,col (x,y).
[xJ       erases cursor pos to end of screen. x<>0,1,2
[x;0J     erases cursor pos to end of screen.
[x;1J     erases beg. of screen to and including cursor pos.
[x;2J     erases entire screen.
[xK       erases cursor pos to end of line. x<> 0,1,2
[x;0K     erases cursor pos to end of line.
[x;1K     erases beg. of line to and including cursor pos.
[x;2K     erases entire current line.
[xX       erases cursor pos and next x chars.
[t;br     sets lines from t to b as a scroll region.
[r        turns off scroll region.

 Character Attributes on VT220 terminals.

[0m    All attributes off
[1m    Intensity  only on
[4m    Underscore only on
[5m    Blinking   only on
[7m    Reverse    only on
[22m   Intensity  only off
[24m   Underscore only off
[25m   Blinking   only off
[27m   Reverse    only off

 To turn on several things at once, separate them by semicolons. eg:

 [22;7m 

 turns intensity off and reverse video on at the same time, but will not 
 affect other attributes.

 Single Height letters
#5string       prints string in single width.
#6string       prints string in double width.
#3topstring    prints top half of double-height string*
#4botstring    prints bot half of double-height string*
                             *Top and bottom strings must be identical.

***************************************

now back to me.....here some I'd like to add.....

  ** COLORS (my personal favorite) ***

[3#m	(where "#" is a number from 0 - 7) This changes the TEXT color
[4#m	(where "#" is a number from 0 - 7) This changes the BACKGROUND colors

Colors:
Foreground                      Background
30 black                         40 black
31 red                           41 red
32 green                         42 green
33 yellow                        43 yellow
34 blue                          44 blue
35 magenta                       45 magenta
36 cyan                          46 cyan
37 white                         47 white

----------------------------------------------

Finally, after making the animation you must know how to view it.  
(replace "fiename.vt" with the animation name)

UNIX:		cat filename.vt	

VAX:		type filename.vt

DOS:		type filename.vt
	NOTE: In DOS it is required that ansi.sys is loaded with the command:
		DEVICE = C:\DOS\ANSI.SYS
	      in your CONFIG.SYS file.

Now if someone can tell me how to set up my MOO to use these.

 /================ e-mail: jlarson@mosquito.frcc.cccoes.edu =====___n___===\
 || \      oo  Joseph Larson ||      TARDIS EXPRESS: When it     |__|__|  ||
 ||  \____|\mm    J(O/SE)^ph || really has to be there YESTERDAY |[]|[]|  ||
 \===//_//\ \_\==================================================|[]|[]|===/
    /K-9/  \/_/   "There's nothing out there you can't do,       |[]|[]|JaL
   /___/_____\     Yea, even Santa Claus believes in you!"       =======



References:

Home | Subject Index | Thread Index