Hello
I want to change the background and foreground color of an PC-DOS screen. Unfortunately I cant find the COLOR command in PC-DOS so I tried things using ANSI.SYS /.COM but I cant get it to work right.
What is the code for changes the back and fore colors at once (not only the prompt when you type new text...) And how do I put the Escape character in my BATCH file?
Thanks
Ewoud
Comments
:
: I want to change the background and foreground color of an PC-DOS screen. Unfortunately I cant find the COLOR command in PC-DOS so I tried things using ANSI.SYS /.COM but I cant get it to work right.
:
: What is the code for changes the back and fore colors at once (not only the prompt when you type new text...) And how do I put the Escape character in my BATCH file?
:
: Thanks
:
: Ewoud
:
Well, in a BATCH file I'm afraid you can't change any colors and display ESC character. Only if you execute such program in the batch.
****************
Any questions? Just ask!
:-) [b][blue]GAASHIUS[/blue][/b] :-)
The problem is..I have set up a bootmenu in the config.sys in wich you set the back and forecolor but from one of the menuoptions, other batchcommands are executed and then the screen changes to default black again, not nice!
Thanks, Ewoud
:
: The problem is..I have set up a bootmenu in the config.sys in wich you set the back and forecolor but from one of the menuoptions, other batchcommands are executed and then the screen changes to default black again, not nice!
:
: Thanks, Ewoud
:
Maybe there's a file executed that sets the colors to default.
****************
Any questions? Just ask!
:-) [b][blue]GAASHIUS[/blue][/b] :-)
Yeah I noticed also but.. thought this was normal..because the only thing I execute is a program that belongs to the dos set: choice.com
I noticed in an example of someone else's work that the colors remain wich are set in the bootmenu. But now you mention it.. I will experimentate with this and try to replace the choice application or just leave it out and test what it does then to the colors..
I also found a great example batch how to use ansi.sys driver to change colors. I had already set it up with ansi but i couldnt remember and figure how to get this escape key into a batch. But now with this example I can create just any type of menu , colors, graphics.. You probably know about it, if not I could send you that batch.
Anyway thanks for the reply I will expirimentate some more and psot the result. Oh by the way.. I ran into another problem.. I guess I already posted it here. About variables in PC-DOS. I cant get to set a variable to read ERRORLEVEL and in MSDOS it works correct....
example:
@ECHO OFF
CLS
SET PATH=C:
ECHO Settings Menu
ECHO ================
ECHO.
ECHO blah blah blah...?
ECHO.
ECHO.
ECHO [1] Option 1
ECHO [2] Option 2
ECHO.
ECHO.
ECHO Enter your choice:
ECHO.
CHOICE /C:12 >NUL
SET SRC=%ERRORLEVEL%
ECHO You have entered %SRC%
PAUSE >NUL
If I run this in MS-DOS it works, but PC-DOS returns nothing for %SRC%
Ewoud
: Yeah I noticed also but.. thought this was normal..because the only thing I execute is a program that belongs to the dos set: choice.com
:
: I noticed in an example of someone else's work that the colors remain wich are set in the bootmenu. But now you mention it.. I will experimentate with this and try to replace the choice application or just leave it out and test what it does then to the colors..
:
: I also found a great example batch how to use ansi.sys driver to change colors. I had already set it up with ansi but i couldnt remember and figure how to get this escape key into a batch. But now with this example I can create just any type of menu , colors, graphics.. You probably know about it, if not I could send you that batch.
:
: Anyway thanks for the reply I will expirimentate some more and psot the result. Oh by the way.. I ran into another problem.. I guess I already posted it here. About variables in PC-DOS. I cant get to set a variable to read ERRORLEVEL and in MSDOS it works correct....
:
: example:
:
: @ECHO OFF
: CLS
: SET PATH=C:
: ECHO Settings Menu
: ECHO ================
: ECHO.
: ECHO blah blah blah...?
: ECHO.
: ECHO.
: ECHO [1] Option 1
: ECHO [2] Option 2
: ECHO.
: ECHO.
: ECHO Enter your choice:
: ECHO.
: CHOICE /C:12 >NUL
:
: SET SRC=%ERRORLEVEL%
:
:
: ECHO You have entered %SRC%
:
: PAUSE >NUL
:
:
: If I run this in MS-DOS it works, but PC-DOS returns nothing for %SRC%
:
:
: Ewoud
:
:
PC-DOS is an MS-DOS emulator(I never heard of it)? If so, then that's the reason for it doesn't work. Therefore you can do nothing with it. Or, there are maybe other ways with these variables in PC-DOS, if there are any help files or something, check it.
****************
Any questions? Just ask!
:-) [b][blue]GAASHIUS[/blue][/b] :-)
:
MS-DOS is better, and that's the point ;-)
****************
Any questions? Just ask!
:-) [b][blue]GAASHIUS[/blue][/b] :-)