: SETCOLOR Set Standard ANSI Color Escape Codes 03/21/1996-10/15/1999 : --------------------------------------------------------------------- : Copyright (C) 1996-1999 by Vladimir Veytsel www.davar.net : 1. Operation mode: : "?" - Display SETCOLOR batch command text (Equivalent: "/") : "" - Autodetect (4DOS) monitor type (color or mono CRT) : NB: Mono LCD monitor can't be autodetected! : "0" - Cancel ANSI escape codes (turn Black-and-White) : "Z" - Cancel ANSI escape codes (turn Black-and-White) : "C" - Set ANSI escape codes for color monitor : "M" - Set ANSI escape codes for mono CRT monitor (television-like) : "L" - Set ANSI escape codes for mono LCD monitor (calculator-like) : "H" - Display ANSI color help and message samples : (anything except above mentioned is treated as help request) : Notes: : - CONFIG.SYS should contain ANSI.SYS installation line: : "DEVICE=C:\DOS\ANSI.SYS" for native DOS boot : "DEVICE=C:\WINDOWS\COMMAND\ANSI.SYS" for Windows-95 DOS session : - CONFIG.NT should contain ANSI.SYS installation line: : "DEVICE=C:\WINNT\SYSTEM32\ANSI.SYS" for Windows-NT DOS session : - If ANSI.SYS is not installed, colors are deactivated @ECHO %TR% IF %1.==/. .OR. %1.==?. (LIST %_BATCHNAME ^ QUIT) SET SCL=%1 ^ IF %SCL%.==. SET SCL=%@SUBSTR[%_MONITOR,0] SET SCL=%@UPPER[%SCL%] IFF %_ANSI==0 THEN @ECHO ANSI.SYS is not installed SET SCL=0 ENDIFF IFF %SCL%.==0. .OR. %SCL%.==Z. THEN SET R= SET G= SET Y= SET B= SET M= SET C= SET W= SET D= @ECHO %S%Screen colors are deactivated QUIT ELSEIFF %SCL%.==C. .OR. %SCL%.==COLOR. THEN SET R= ^: Bright Red SET G= ^: Bright Green SET Y= ^: Bright Yellow SET B= ^: Bright Blue SET M= ^: Bright Magenta SET C= ^: Bright Cyan SET W= ^: Bright White SET D= ^: Gray (DOS regular) QUIT ELSEIFF %SCL%.==M. .OR. %SCL%.==MONO. THEN : Sample Mono CRT pattern follows: SET R= ^: Bright White SET G= ^: Bright White SET Y= ^: Bright White SET B= ^: Bright White SET M= ^: Bright White SET C= ^: Bright White SET W= ^: Bright White SET D= ^: Gray (DOS regular) QUIT ELSEIFF %SCL%.==L. THEN : Sample Mono LCD pattern follows: SET R= ^: Bright White SET G= ^: Bright White SET Y= ^: Bright White SET B= ^: Bright White SET M= ^: Bright White SET C= ^: Bright White SET W= ^: Bright White SET D= ^: Gray (DOS regular) QUIT ELSE CLS @ECHO %G%ANSI Codes Demo (in Terms of Color Monitor) @ECHO -------------------------------------------- @ECHO %R%Bright Red: R - Error message @ECHO %G%Bright Green: G - Title, info or disk name/letter @ECHO %Y%Bright Yellow: Y - Command name or text accent @ECHO %B%Bright Blue: B - Status message @ECHO %M%Bright Magenta: M - Error message highlight @ECHO %C%Bright Cyan: C - Key, status msg h/l or compl message @ECHO %W%Bright White: W - Request or text highlight @ECHO %D%Gray: D - DOS regular text @ECHO: @ECHO %G%Several examples follow:%D% @ECHO: @ECHO %W%Insert %G%DDDD %W%disk into floppy drive %G%A: %W%and hit %C%[Enter]%D% @ECHO %W%Hit %C%[Enter] %W%to play %Y%next %W%tune or %C%[Esc] %W%to %Y%quit%D% @ECHO %R%Wrong disk %M%XXXX %R%is inserted instead of requested %M%DDDD%D% @ECHO %R%Free space on disk %M%DDDD %R%is only %M%12 %R%Kilobytes%D% @ECHO %B%Batch command %C%tracing %B%mode is now %C%OFF%D% @ECHO %G%Execution will take some time, please wait...%D% @ECHO Reading source file(s)... ENDIFF UNSET SCL