Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

questions about ANSI-menus

41 views
Skip to first unread message

bernhard wiz

unread,
Jan 10, 2004, 6:17:46 PM1/10/04
to
Hello,

im just to think about how i could make a colored ANSI menu instead of a
usual selection menu in a batch.
My idea was to make a menu where I can choose an option with the cursor
up and down keys. The chosen option should be marked (like the boot menu
of WinXP).

In addition the following things would interest me:

- How can I show ANSI pictures with a batch under WinXP?
- Does someone know an editor for ANSI graphic under Windows
- Does someone know a newsgroup for ANSI or ANSIart?

Thanks for helping
Bernhard Wiz

-------------------------------------------------------------------------
Because my English is not always so understandably, i wrote the Questions
above also in German:

Hallo,

Ich bin mir gerade am überlegen, wie ich statt einem üblichen Auswahlmenü
in einer Batch-Datei ein farbiges ANSI-Menü basteln könnte. Die Auswahl
sollte ganz einfach mit den Cursortasten möglich sein. Wenn mit der
Cursortaste eine Option des Menüs ausgewählt wird, sollte diese markiert
werden, bevor man die Eingabetaste zum Bestätigen drücken muss.

Neben Lösungsvorschlägen zu einem Menü wie oben beschrieben, würde mich
auch folgendes interessieren:

- Wie kann ich farbige ANSI-Bilder von einer Batch aus anzeigen lassen?
- Kennt jemand einen Editor für ANSI-Grafik, welcher unter WinXP läuft?
- Gibt es eventuell sogar eine Newsgroup zum Thema ANSI oder ANSIart
- Ist es möglich, dass die Batch zu einem Befehl springt, nur wenn man
die Cursertasten betätigt?

Marco Maier Said

unread,
Jan 10, 2004, 7:15:14 PM1/10/04
to
"bernhard wiz" wrote in message
<news:40008816$0$724$5402...@news.sunrise.ch> :

> Hello,
>
> im just to think about how i could make a colored ANSI menu instead of a
> usual selection menu in a batch.
> My idea was to make a menu where I can choose an option with the cursor
> up and down keys. The chosen option should be marked (like the boot menu
> of WinXP).
>
> In addition the following things would interest me:
>
> - How can I show ANSI pictures with a batch under WinXP?
> - Does someone know an editor for ANSI graphic under Windows
> - Does someone know a newsgroup for ANSI or ANSIart?
>
> Thanks for helping
> Bernhard Wiz
>

You have to add the line:
device=c:\winnt\system32\ansi.sys
to the file c:\windows\system32\config.nt
if you want ANSI support for XP.

--
Best,
Marco

Al Dunbar

unread,
Jan 10, 2004, 7:44:28 PM1/10/04
to

"Marco Maier Said" <full...@softhome.net> wrote in message
news:18yqrka23sfjv$.dlg@MRC.MIR.SID.75...

Or alternately, you could download ctext from
http://www.labyrinth.net.au/~dbareis/ppwizard.htm (Dennis Bareis). This is
a: "Simple program while allows you to display batch file output in many
colors", according to the help text. I tried it and it seems to work fine,
and doesn't require any driver installation.

/Al

Marco Maier Said

unread,
Jan 11, 2004, 10:53:35 AM1/11/04
to

> You have to add the line:
> device=c:\winnt\system32\ansi.sys
> to the file c:\windows\system32\config.nt


And run command.com instead of cmd.exe

--
Best,
Marco

bernhard wiz

unread,
Jan 11, 2004, 10:59:35 AM1/11/04
to
Marco Maier Said <full...@softhome.net> wrote in
news:18yqrka23sfjv$.dlg@MRC.MIR.SID.75:
>
> You have to add the line:
> device=c:\winnt\system32\ansi.sys
> to the file c:\windows\system32\config.nt
> if you want ANSI support for XP.
>
The lines standing in my "c:\windows\system32\config.nt" are:

dos=high, umb
device=%SystemRoot%\system32\himem.sys
files=40
device=%SystemRoot%\system32\ansi.sys

But nevertheless i can't display ansi pictures under WinXP. When i make a
.bat like this...

@echo off
type D:\bat\experimente\menu.ans
pause

...it doesn't show the ansi-picture inside of menu.ans. I can only see
some white and grey cubes and ansi-code ( <-[1;31;41m... )

It really would interest my what I'm doing wrong.

--
Bernhard

bernhard wiz

unread,
Jan 11, 2004, 11:38:51 AM1/11/04
to
Marco Maier Said <full...@softhome.net> wrote in news:16w1k67gg569p
$.dlg@MRC.MIR.SID.75:

It doesn't work with cmd.exe and command.com
Do I have to add something in another file?

--
Bernhard

foxidrive

unread,
Jan 11, 2004, 12:03:49 PM1/11/04
to

I made ansi screens display in XP by installing ansi.com in a cmd window

===[screen capture]===
ANSI 1.3 (C) 1988 Ziff Communications Co.
PC Magazine ■ Michael J. Mefford

Syntax: ANSI [FAST | SLOW][ON | OFF][/B nnn][/C][/U]
FAST = direct screen writes; default
SLOW = screen writes via BIOS
ON/OFF = active/inactive; default is ON
nnn = buffer size in bytes (0 - 60K) reserved for key reassignment; default 200
===[/screen capture]===

and then shelling to command.com to type the screen.

IE:
command /c type shuttle2.ans

Timo Salmi

unread,
Jan 11, 2004, 12:21:18 PM1/11/04
to
bernhard wiz <w...@gmx.net> wrote:
> Marco Maier Said <full...@softhome.net> wrote in news:16w1k67gg569p
> >> You have to add the line:
> >> device=c:\winnt\system32\ansi.sys
> >> to the file c:\windows\system32\config.nt
> > And run command.com instead of cmd.exe

> It doesn't work with cmd.exe and command.com
> Do I have to add something in another file?

http://www.google.com/groups?selm=uf3goqt...@corp.supernews.com
http://www.google.com/groups?selm=92sqvr$vfl$1...@nnrp1.deja.com

One interpretation: Best forget about ansi.sys

All the best, Timo

--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
mailto:t...@uwasa.fi <http://www.uwasa.fi/~ts/> ; FIN-65101, Finland
Useful script files and tricks ftp://garbo.uwasa.fi/pc/link/tscmd.zip

Marco Maier Said

unread,
Jan 11, 2004, 12:57:37 PM1/11/04
to
"bernhard wiz" wrote in message
<news:400172e6$0$730$5402...@news.sunrise.ch> :

You have to rewrite menu.ans replacing some characters.

http://www.uv.tietgen.dk/staff/mlha/PC/Soft/DOS/Drivers/ansi-sys.htm
http://www.o2post.com/kuban/ansi/ansi.htm

--
Best,
Marco

Ted Davis

unread,
Jan 11, 2004, 1:29:55 PM1/11/04
to
On 11 Jan 2004 19:21:18 +0200, t...@UWasa.Fi (Timo Salmi) wrote:

>One interpretation: Best forget about ansi.sys

I concur. I used to use ANSII menus and other pages for user
interfaces until NT came along and I lost the functionality. It took
a while, but I eventually settled on using web pages and local servers
(Apache - I wouldn't touch IIS with the twelve-foot pole I keep around
for touching things I wouldn't touch with a ten-foot pole). This even
has the added benefit that sometimes - when it makes sense - the menu
or other interface allows remote control. When Apache is running as a
user app rather than a system service, it has the user's rights and
network access. The drawback is that shelled commands open a window
in front of the browser - I use Winhide to close them immediately.

The most recent project finds which drive letter corresponds to a
removable memory module (flash card, microdrive, etc.) - mostly
carrying pictures from our loner digital camera, creates a directory
on the hard drive for them, xcopies the files, prints a notice for the
user telling him where the files are on the web server, and offers to
erase the module. The console for the machine is in an awkward
location, so the remote capability came in handy. While I didn't use
colors or other available features, the web interface is *much* more
readable than the DOS window text it replaced and the users are more
comfortable with the well known web mouse interface than with the - to
them - obsolete text mode command line interface.


T.E.D. (tda...@gearbox.maem.umr.edu - e-mail must contain "T.E.D." or my .sig in the body)

Joe Batch

unread,
Jan 11, 2004, 3:52:39 PM1/11/04
to

bernhard wiz wrote:
> >> You have to add the line:
> >> device=c:\winnt\system32\ansi.sys
> >> to the file c:\windows\system32\config.nt
> >
> >
> > And run command.com instead of cmd.exe
> >
>
> It doesn't work with cmd.exe and command.com
> Do I have to add something in another file?

Despite MS claims, I could not get ansi.sys to work in any
version of NT. Ansi.sys does not work in NT, and that's all
there is to it :(.


Marco Maier Said

unread,
Jan 11, 2004, 5:19:07 PM1/11/04
to
"Joe Batch" wrote in message <news:TVbAAB$b...@conxion.com> :

Eh? I'm running XP and it works.
if the line device=c:\winnt\system32\ansi.sys
is present in c:\windows\system32\config.nt
there is no problem.

Marco Maier Said

unread,
Jan 11, 2004, 5:22:09 PM1/11/04
to
"Marco Maier Said" wrote in message <news:1emn932aixe4y$.dlg@MRC.MIR.SID.75>
:

There are problem running .ans files
but it is possible to replace some characters
and get them to work.

Are you saying that if,for example,in command.com,
you type PROMPT $e[7m$n$p$e[m
nothing happens ?

bernhard wiz

unread,
Jan 11, 2004, 5:40:10 PM1/11/04
to
t...@UWasa.Fi (Timo Salmi) wrote in news:bts0me$e...@poiju.uwasa.fi:

Thanks for the information. Now I see it a bit clearer.
If ansi.sys is not really usefully with batch under WinXP, could I use
ansi.com written by Michael J. Mefford instead of ansi.sys?

--
Bernhard

Marco Maier Said

unread,
Jan 11, 2004, 5:55:17 PM1/11/04
to
"bernhard wiz" wrote in message
<news:4001d0ca$0$733$5402...@news.sunrise.ch> :

His suggestion was not to use ansi at all and he is right.
But if you have some files to play with,yes, you could use
ansi.com or this one:
http://riverbbs.net/cds/bonanza/scrnutil/SMILE13.ZIP

--
Best,
Marco

Al Dunbar

unread,
Jan 11, 2004, 8:01:52 PM1/11/04
to

"Ted Davis" <tda...@gearbox.maem.umr.edu> wrote in message
news:j74300hfq40gm7sru...@4ax.com...

> On 11 Jan 2004 19:21:18 +0200, t...@UWasa.Fi (Timo Salmi) wrote:
>
> >One interpretation: Best forget about ansi.sys
>
> I concur. I used to use ANSII menus and other pages for user

<snip>

> The most recent project finds which drive letter corresponds to a
> removable memory module (flash card, microdrive, etc.) - mostly
> carrying pictures from our loner digital camera,

Digital Camera photographers may indeed be "loners", but the camera itself
is more likely a "loaner". ;-)

/Al


Ted Davis

unread,
Jan 11, 2004, 9:54:43 PM1/11/04
to

It's been a worse than usual typing day, but I'm going to blame that
one on Dandy - he was walking all over me and the keyboard at that
time
(<http://www.maem.umr.edu/tdavis/cats/03.jan/dandy.267x400.2.jpg>).

Al Dunbar

unread,
Jan 12, 2004, 1:10:57 AM1/12/04
to

"Marco Maier Said" <full...@softhome.net> wrote in message
news:gxn85rx12yzb$.dlg@MRC.MIR.SID.75...

Or alternately (as I posted yesterday), you could download ctext from

Message has been deleted

Charles Dye

unread,
Jan 12, 2004, 5:28:26 PM1/12/04
to
bernhard wiz <w...@gmx.net> wrote in message news:<4001d0ca$0$733$5402...@news.sunrise.ch>...
> Thanks for the information. Now I see it a bit clearer.
> If ansi.sys is not really usefully with batch under WinXP, could I use
> ansi.com written by Michael J. Mefford instead of ansi.sys?

You could, but the results would be the same as installing ANSI.SYS:
you'd get support for ANSI sequences *in DOS programs*. Unless you
are using a DOS-based command shell (unlikely), that's not going to
do you any good. (AFAIK, the NT version of COMMAND.COM simply
hands internal commands like TYPE off to CMD.EXE. So even if you
start COMMAND.COM instead of CMD.EXE, you still won't be able to
TYPE files containing ANSI sequences.)

The current version of 4NT does offer support for ANSI display
sequences in internal commands (only). From within 4NT, you could
do e.g.

option //ansi=yes
type c:\myfile.ans

But note that this works only for internal commands like TYPE.
For DOS programs which generate output containing ANSI sequences,
you might be able to redirect output to a file and then TYPE that:

option //ansi=yes
ansiprog.exe > $temp$.txt
type $temp$.txt
del $temp$.txt

Another approach: Install ANSI.SYS via your CONFIG.NT file, as
suggested above. Then start 4DOS, or NDOS, or the COMMAND.COM
from DR DOS. All of these are DOS-based programs which should
run adequately under Windows NT, and which ought to suffice for
the purpose of dumping text files to the console.

But the straightforward way to use a DOS-based program would be
to run it from DOS. Say, from a boot floppy with ANSI.SYS or
ANSI.COM installed ....

--
Charles Dye ras...@highfiber.com

Timo Salmi

unread,
Jan 24, 2004, 9:23:35 PM1/24/04
to
In article <bts0me$e...@poiju.uwasa.fi>, Timo Salmi <t...@UWasa.Fi> wrote:
> bernhard wiz <w...@gmx.net> wrote:
> > Marco Maier Said <full...@softhome.net> wrote in news:16w1k67gg569p
> > >> You have to add the line:
> > >> device=c:\winnt\system32\ansi.sys
> > >> to the file c:\windows\system32\config.nt
> > > And run command.com instead of cmd.exe

> > It doesn't work with cmd.exe and command.com
> > Do I have to add something in another file?

I have revisited this old question (hence the long quoting), since I
wished to add some color to a couple of my own XP scripts. This is
the draft that I came up with

51) How can I echo lines in different colors in NT scripts?

There is no easy answer. The COLOR command affects the entire
screen, not just the next output. That's not what we want in this
item. In MS-DOS+Win..95/98/ME one can use ANSI.SYS for the task. In
NT/2000/XP it is possible in principle under COMMAND.COM, but in the
NT-series it is too cumbersome and installing it has too much side
effects to be practical. Therefore a customized solution is needed.
One option is to use an "ECHOC.EXE Echo in colors" tool for the
task. It is a Turbo Pascal program included in tscmd.zip [ECHOC.EXE
will be part of the next tscmd.zip release. It is _not_ there yet!].
For example one might have

@echo off & setlocal enableextensions
echoc 0 14 On black bright yellow
echo.
echoc 1 13 On blue bright magenta
echo.
echo Back to normal
endlocal & goto :EOF

0 new messages