August 10, 1986 ANSI-AID Simple Tutorial More and more PC-Board SYSOPS are making animated Color Graphic Screens now than than ever before. I remember when I saw my first one and wondered, "How'd they do that?". Since then I have learned how it is done and would like to help those who don't but would like to. To start there are other ways of making these Animated screens other than the "old fashioned" way with a Text Editor. ANSIANIM (becomming a very popular program for making animated screens), THEDRAW, ANSIDR, and GENANSI are but a few of the different programs that simplify the making of ANSI Color Screens. For "Old Time" sake I will explain, or try to, how to make these screens using a Text Editor. Now we have covered the commands and what they do in the "ESCSEQUE.TXT" file. Here is a sample that starting at Row 12 Column 37 will print "Hell-o" in different foreground colors and Cyan background normal intensity. ************************* N O T E ********************** Do not type in the characters "Esc", you will have to find out what command you use with your text editor that will give you the esc character. PC-Write uses ^Q for this. ********************************************************** Esc[12;37HEsc[31;46mHEsc[32meEsc[33mlEsc[34mlEsc[35m-Esc[37mo Use your Text Editor to make an ASCII text file that looks like the line above and save it. Now, do a "Type {filename}". If you get the word "Hell-o" printed about in the middle of the screen I haven't lost you yet and we can go on. Next, do a "CLS", what happened? The Screen should now have a Cyan background and white foreground, YUK!!!!!! Let's add something else to the file you just made. Add Esc[30;44m to the end of the file, save it and "type" it again. Look the same? Type a few characters at the DOS prompt. what happened? Hmmm.... Black characters on a Blue background? Do a "CLS" and you should have a Blue background with a Black DOS Prompt. With me so far? GOOD!!! -2- Now, let's add one other thing, this time to the very beginning of our "Hell-o" file. Let's add Esc[2J, save it then hit the enter key a few times to get some stuff on the screen. Now "type" the file. Hmmm... did it clear the screen and give you the message "Hell-o"? That Esc[2J is the Clear Screen Sequence. Let's add something else to the very beginning of our file. Add Esc[0m this time, save and "type". This should have given you Black background on the screen except where the word "Hell-o" is and the DOS prompt. Next let's add some more to our file. to the end of the file let's add everything inside the quotes (excluding the quotes) "Esc[13;16HI should see Black foreground and Blue background". Save this and then "type" it. But you say you want to have the DOS prompt once the file is typed to be white on Black? OK, add Esc[0m right after the "d" in background. This just turned off your color and will show the DOS prompt and everything else that you type in White foreground and black background. Let's add another bit of stuff to our file now. Add this in front of the Esc[0m at the end of our little file: (again, everything inside the quotes) "Esc[12;42HoEsc[2D-Esc[2DlEsc[2DlEsc[2DeEsc[2DH" Now, save it and "type" it. See what happened? The "Hell-o" should print, then our second line then "Hell-o" again with a bit of a twist to it this time. The second "Hell-o" should be black foreground, blue background but should write the second "Hell-o" going backwards!! That's a combination of 2 things, first we told the cursor to go to Row 12 Column 42 with the "Esc[12;42H which is where the "o" is located and print another "o", then we used the Esc[2D to back the cursor up 2 cloumns to place it under the "-" etc. -3- This little tutorial was intended not to make "experts" out of you but just to get you started and see how you can go about making color screens utilizing DOS's ANSI.SYS commands. Anyone interested in going farther with ANSI.SYS shoule invest in the DOS Technical Reference Manual or another book that goes into greater detail. Derry Nelson SYSOP 1149 BBS Elkhart, IN (219) 522-1149 2400/1200/300 baud 8 N 1 24 hours a day 7 days a week Featuring PC-Board Hostware PC/MS-DOS Board