ECHO [32;40m=================
ECHO Quake 4 - selector
ECHO =================
the line is offset, it is hard to read and compare the batch lines between up and down
----------------------------------------------
ECHO [32;40m
ECHO =================
ECHO Quake 4 - selector
ECHO =================
this is what i want but WITHOUT adding a line
ECHO <esc>[32;40m
ECHO [32;40m
is there a way to achieve the effect?
simply using [32;40m without ECHO kind of worked but i am not sure if i have to use the command NUL to remove the error message.
is there a way to use ECHO <esc>[32;40m without adding an extra line?
Moderator: DosItHelp
Re: is there a way to use ECHO <esc>[32;40m without adding an extra line?
You can try the following?
Make sure that the color and the txt is between "", then the color becomes %~1 and the txt becomes %~2
Code: Select all
@echo off
cls
call :necho "[32m" "=================="
call :necho "[36m" "Quake 4 - selector"
call :necho "[32m" "=================="
exit /b
:necho
set "txt=%~1%~2[0m"
echo %txt%
exit /b
Re: is there a way to use ECHO <esc>[32;40m without adding an extra line?
nnnmmm wrote: ↑05 Jul 2024 03:04Code: Select all
ECHO [32;40m ECHO ================= ECHO Quake 4 - selector ECHO ================= this is what i want but WITHOUT adding a line
Code: Select all
<nul Set /P "=[32;40m"
ECHO =================
ECHO Quake 4 - selector
ECHO =================
Re: is there a way to use ECHO <esc>[32;40m without adding an extra line?
<nul Set /P "=[32;40m"
was so good, thanks
how can <nul make the prompt disappear?
nul i know makes an imaginary file you dump things into it without causing anything
a reason i need [32;40m instead of color 0A was
i have two types of 100s batch files
one goes with" Press any other key to CONTINUE"
the other goes "Press any other key to QUIT"
it takes some energy out of me to locate these words to identify which one CONTINUE or QUIT
but if a QUIT batch has a little bit of color somewhere(a whole color 0A sends a little shock to my head because not used to a whole), i can use my peripheral vision to identify it in no time
was so good, thanks
how can <nul make the prompt disappear?
nul i know makes an imaginary file you dump things into it without causing anything
a reason i need [32;40m instead of color 0A was
i have two types of 100s batch files
one goes with" Press any other key to CONTINUE"
the other goes "Press any other key to QUIT"
it takes some energy out of me to locate these words to identify which one CONTINUE or QUIT
but if a QUIT batch has a little bit of color somewhere(a whole color 0A sends a little shock to my head because not used to a whole), i can use my peripheral vision to identify it in no time
Re: is there a way to use ECHO <esc>[32;40m without adding an extra line?
Maybe you can adjust your txt toone goes with" Press any other key to CONTINUE"
the other goes "Press any other key to QUIT"
Code: Select all
echo Press any other key to [32mCONTINUE[0m