home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / ansi / acolor.arj / ACOLOR.DOC < prev    next >
Encoding:
Text File  |  1992-01-28  |  7.8 KB  |  168 lines

  1. ACOLOR.DOC                  ╓────────────────╖
  2.                             ║   ACOLOR.COM   ║
  3.                             ╙────────────────╜
  4.                     (C) Copyright 1992 by Rand Nowell
  5.                             RaLin Enterprises
  6.                    40728 Sundale Dr. Fremont, Ca. 94538
  7.                               (510) 651-0253
  8.  
  9.    A(nsi)COLOR......
  10.    ---------------------------------------------------------------------
  11.    Command: acolor -or- color   (See below)
  12.    ---------------------------------------------------------------------
  13.    Requirements: Color monitor for color display
  14.    A line saying: Device=Ansi.sys is include in the Config.sys file
  15.    ---------------------------------------------------------------------
  16.    To Print Document: Copy Acolor.doc Prn -or- Type Acolor.doc>prn
  17.    ---------------------------------------------------------------------
  18.    ACOLOR.COM is a simple com file which displays a chart with the number
  19.    values for text foreground and backround color ansi codes, along with
  20.    the attributes for Bold, Blinking etc. Along with a couple of
  21.    examples. The color names are shown in their respective colors,
  22.    and are listed as to whether they can be used for foreground,
  23.    backround or both.
  24.  
  25.    ACOLOR.COM  is not a resident program (TSR) and will not remain in
  26.    memory and does not have a hotkey to call it. I figured this really
  27.    wasn't a program that one would need available all the time. If I do
  28.    decide to make it a TSR I will make the new version available.
  29.  
  30.    This utility came about from having to look up ansi code numbers and
  31.    attributes whenever I needed to create color prompts or quick command
  32.    displays. This chart saves a lot of time. You won't use it all the time,
  33.    but when you need it, you'll be glad its there!
  34.  
  35.    There are several ways you could use this chart. Call it from the
  36.    prompt, call from a programs shell command, or as in the QEdit editor
  37.    program, you could create a macro to shell to dos, bring up the TCOLOR
  38.    chart, then return to your text file. Such a macro in Qedit would be:
  39.  
  40.      MacroBegin SaveFile CurrentFileName Dos 'acolor' Return Return ---->
  41.      EditFile CurrentFileName Return  (These two lines would be one
  42.      continuous line in the Macro)
  43.  
  44.      You could also create a 'hotkey' using ansi escape sequences in your
  45.      Autoexec.bat (Different commands than used in ACOLOR)
  46.  
  47.    One annoying problem when calling ACOLOR.COM from the command line, is
  48.    after the chart is displayed on the screen, the prompt often overwrites
  49.    a small portion of the chart. It doesn't always cover any important
  50.    information, its just distracting. So I have included a batch file
  51.    called COLOR.BAT which calls ACOLOR.COM and pauses. This eliminates the
  52.    prompt problem.
  53.  
  54.    This program is distributed as FreeWare. You are not required to
  55.    register for use. No fee is required. Copies may be distributed as long
  56.    as all the original files are included. Please distribute the ZIP file.
  57.    These original Files are:
  58.  
  59.           ACOLOR.COM     : The Color Chart
  60.           VIEWDOC.COM    : View The Documentation
  61.           COLOR.BAT      : To Run TCOLOR with pause
  62.           ACOLOR.DOC     : This Document
  63.  
  64.                                 - Page 1 -
  65.  
  66. ACOLOR.DOC
  67.  
  68.    To give you an idea of what can be done with the Ansi codes, try the
  69.    following. This is the prompt I created  for my system. I got tired of
  70.    looking at the plain ol C:\> so I fixed up a more pleasing and
  71.    informational one. Make sure Ansi.sys is loaded in the system and
  72.    type the following on ONE LINE, you may have to reset the right margin in
  73.    your text editor. Ansi code commands cannot be split on the lines, spaces
  74.    in the command are included in the results.
  75.  
  76.  
  77. prompt $e[1;37;44m Alt-F9 For Menu $_$e[33;44m $d  $e[0m$e[30;40m$_$e[33;
  78. 40m═════════════════$e[0m$_$e[33;40m$p$g$e[36;40m
  79. /\
  80. |-------continuation of line above...NO spaces
  81.  
  82. The $e is the ESC command for prompt design. If you are using ansi codes
  83. to modify keyboard commands, for instance, $e wouldn't work. In those
  84. cases you must insert an actual esc char. Most text editors such as Qedit
  85. and Norton Editor allow you to do this by first pressing Ctrl-P then the esc
  86. key which will insert the arrow sign for escape. IF you have an editor such as
  87. one of these, then you've got it made!
  88.  
  89.   The above ansi commands (again, all on one line) create a prompt that looks
  90.   like this:    My screen backround is black....
  91.  
  92.             Alt-F9 For Menu \  Top 2 lines, brite yellow on blue
  93.             Tue 01-29-1992  /
  94.             ═══════════════ \  Dbl line and prompt, Brown on black
  95.             C:\TEMP3>       /
  96.             ------------------Then the color is set to cyan on black,
  97.             ------------------my default text color.
  98.  
  99.    You will notice some other commands in the prompt, such as $_
  100.    these are your cursor control commands, which allow you to move
  101.    the cursor down while writing the prompt to screen. Refer to your
  102.    DOS manual for the codes and what they do. I just cannot go into all
  103.    of them in this document.
  104.  
  105.    Try the above prompt out, experiment with different colors, make sure
  106.    you space commands out exactly as above. If you want, after you have got
  107.    it working, change the spacing and see what it does to the prompt.
  108.  
  109.    Now, rather than putting the above in your autoexec.bat and rebooting
  110.    to see the results, put the above in a plain ascii text file and name
  111.    it something like ptest....(leave off the word prompt) then to view it,
  112.    at the prompt, just type: Type ptest & press Enter..............
  113.    Walla!!! your custom prompt.
  114.    Experiment, play, have a good time !!!!
  115.  
  116.   Suggestion: Place ACOLOR.COM + COLOR.BAT in a directory thats in your
  117.               PATH statement.
  118.  
  119.   If you couple the ansi color codes with the cursor movement codes
  120.   you can create some FANTASTIC prompts, custom messages, all kinds
  121.   of trick things. Unfortunatly I cannot cover all those commands too.
  122.  
  123.   Also, I'd like to apologise for how crowded the Ansi Code Chart is
  124.   on the screen, only have 24 lines to work with, and I tried to get
  125.   as much as possible on the screen. Oh well............
  126.  
  127.                                   - Page 2 -
  128.  
  129. ACOLOR.DOC
  130.  
  131.   < * * * * * * * * * * * * *   DISCLAIMER  * * * * * * * * * * * * * * >
  132.   THIS PROGRAM IS DISTRIBUTED AS IS. RAND NOWELL AND/OR RALIN ENTERPRISES
  133.   ASSUMES NO RESPONSIBILITY FOR ANY DAMAGE TO FILES, SYSTEM, OR PEACE OF
  134.   MIND RESULTING FROM THE USE OF ACOLOR.COM OR ACCOMPANYING FILES.
  135.   < * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * >
  136. |----------------------------------------------------------------------|
  137. | <P.S.> In the chart you will notice the word BLACK is in a gray      |
  138. |        color...this is actually Bright Black..foreground color only. |
  139. |----------------------------------------------------------------------|
  140.   [ Coming:] There will be a more utilities coming as they are written.
  141.   To remain informed of releases and updates see below.
  142.   The companion program to this is TCOLOR.COM, a chart of
  143.   Text Color Attributes. Look for it!
  144.  
  145.   If you are overcome with the desire to contribute a donation towards
  146.   the continuation of programs such as these. The amount of $1.00 or more
  147.   will be GREATLY appreciated !!
  148.  
  149.   Anyone contributing $5.00 or more will be notified by mail of the
  150.   release and location of new updates and any other utilities made
  151.   available to the public. Be sure to include your name and address!
  152.  
  153.   Contributions may be sent to: Rand Nowell via the address at the
  154.   document beginning.
  155.  
  156.   Regardless of whether or not you send a donation, it is hoped that this
  157.   small utility is helpful and that you enjoy it!
  158.  
  159.                       (Rand) -=[ RaLin Support! ]=-
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  * End Of Document *
  166.                                 - Page 3 -
  167.  
  168.