Unable to get ConEmu task file to work - conemu

I'm trying to get ConEmu to start up with two tabs, each with their own initial path, and I am completely unable to do so. There is a lot of ConEmu information out there, but I just can;'t get this to work.
I've changed my shortcut to ConEmu to be as follows:
"C:\Program Files\ConEmu\ConEmu64.exe" -run #C:\Users\rhewitt\Documents\conemu_startlist.txt
and the conemu_startlist.txt file contains the following (on one line):
cmd /k color 4C -cur_console:t:"cmd":d:"C:\Users\rhewitt" ^|^|^| cmd /k color 5D -cur_console:t:"git":d:"C:\Users\rhewitt\CONFIG\repos"
Whenever I start ConEmu, I get a single tab called "git" with the following text in it:
Sets the default console foreground and background colors.
COLOR [attr]
attr Specifies color attribute of console output
Color attributes are specified by TWO hex digits -- the first
corresponds to the background; the second the foreground. Each digit
can be any of the following values:
0 = Black 8 = Gray
1 = Blue 9 = Light Blue
2 = Green A = Light Green
3 = Aqua B = Light Aqua
4 = Red C = Light Red
5 = Purple D = Light Purple
6 = Yellow E = Light Yellow
7 = White F = Bright White
If no argument is given, this command restores the color to what it was
when CMD.EXE started. This value either comes from the current console
window, the /T command line switch or from the DefaultColor registry
value.
The COLOR command sets ERRORLEVEL to 1 if an attempt is made to execute
the COLOR command with a foreground and background color that are the
same.
Example: "COLOR fc" produces light red on bright white
C:\Users\rhewitt\CONFIG\repos>
What am I doing wrong?
Apologies if this is a duplicate - I looked, but I can't find anything obvious...

Related

Change Background on specific line in Batch Script

Trying to set the background for line 1 to white and line 2 to black. ASN1 Esc codes seems it would be the fastest way to get it. However it only changed the background at specified text not entire line.
Example of what I'm hoping for:
#echo off
echo <Esc>[107m This Entire line has a white background
echo <Esc>[40m This Entire Line has a black background
pause
what I am getting:
Output
Jebs Comment is spot on.
Set the line position, invert the line, 'K' clear the line & then Position your text to save all that nasty spaces busines.
ECHO <ESC>[1;1H<ESC>[07m<ESC>[K<ESC>[1;55H Hello world

Why is the text color set with ESC sequence not used in console window?

I'm trying to make a login batch file that starts a few services but in a way that the user knows they are being started. So I thought I'd use a batch script for that.
The script is working fine, but I wanted to embellish it a bit more using the logo in ASCII and use colors. Everything is working fine on my development PC (Windows 10 64-bit), but on the user machines (Windows 7 64-bit) the colors are not being shown.
I'm using:
echo <ESC>[93m Logging in
But when I run it, I displays:
←[93m Logging in
So it's not treating the ESC properly.
The issue has to be PC based because it's working on another machine, but I don't know how to solve this.
Only console of Windows 10 supports ESC sequences as documented on MSDN page Console Virtual Terminal Sequences. Console host of previous Windows versions don't support ANSI ESC sequences.
There is the command COLOR to define text color and background color.
Open a command prompt window and run color /? for help on this command.
Hundreds of batch file examples on how to use COLOR can be found on Stack Overflow for example with the search term [batch-file] color.
As mented befoer me, windows prior 10 does not support escape sequences. You could try ANSICON
the old ANSI.SYS, which was loaded at boot time would interpret color commands
such as [esc][1;33;40m (where [esc] was a small arrow) as the foreground and
background colors for text in the DOS prompt window, or outside of windows in
a DOS session. (Worked in Windows 3.1x, Win 95, Win 98 1st and 2nd, Win ME and
perhaps even 32 bit Win XP.)
However,after the introduction of 64-bit systems, ANSI.SYS no longer works as before.
The command "color" in a Windows 7 cmd.exe window colors the ENTIRE window text, not
just the part you want to color. I understand some of this has been alleviated in
Win 10 cmd.exe, but except for that...
There may be a possible solution:
called "CoColor" by Horst Schaeffer
Freeware © Horst Schaeffer -- Contact: horst.schaeffer#gmail.com
http://www.horstmuc.de/wcon.htm
Here is what he says about it:
CoColor 2.1 Change console output color Download 32 bit (6Kb)
Download 64 bit (7Kb)
CoColor changes the console color for the succeeding console output, not for the entire window, like the built-in COLOR command. CoColor uses the same color codes as COLOR.
CoColor also accepts a sequence of color codes and text strings (each in double quote marks), making it a colorful ECHO replacement. Non-ASCII characters will be handled the same way as by ECHO.
Demo.CMD is included.
(NOTE: After running Demo.cmd you will need to run the command color to return
to the default colors of the screen. He did not include that in his script.)
After scanning the files with Avast Antivirus, SuperAntiSpyware and Malwarebytes,
I ran the CoColor 64-bit version on Win 7 Pro 64-bit and it seems to work well.
I wrote a lot of batches back in the old days with color bars for the lines of
text. They did NOT change the color of the entire screen as does the "color"
command in cmd.exe! COMMAND.COM understood color commands with ANSI.SYS loaded
at boot time in the CONFIG.SYS. This is the closest thing I've seen yet to that
original functionality. Hope this helps.

Starting sikuli from batch file, command prompt text won't get coloured

I have made a combination of scripts to execute my test.
Now I have a Main script as well, this one executes the others when needed.
I made a batch file to execute my Run.sikuli file.
It looks like this:
start /min C:\Users\<userName>\Documents\Sikuli\runIde.cmd -r C:\Users\<userName>\Documents\Sikuli\Run.sikuli
Now the above part works fine.
The thing is that I would like to display a different colour of text in the command prompt.
So I added above my line: color 0B
color 0B
start /min C:\Users\<userName>\Documents\Sikuli\runIde.cmd -r C:\Users\<userName>\Documents\Sikuli\Run.sikuli
However, my command prompt is still not black with with light blue letters.
The letters are still white.
Can anyone help me with what I am doing wrong here?
By writing start, you are actually starting a separate window (more info here). So when you set your color, it is only applied to your current window. New window will have its default color again.
NOTE: Just to emphasize, this has nothing to do with Sikuli.

Bat to run a compiled .exe with color green

is there any way to set the color of a simple compiled executable?I am not trying to touch the source code of the executable.What I got so far is:
COLOR fc
start sqwer.exe
However,it's not working.Is it possible?
with start you'll start a new CMD with the standard color.
try running the exe like this :
COLOR fc
sqwer.exe

Can I easily change the colour of text output to the Windows Console from a C Program

I want to make some printf's to the windows console from my C program but want to make some of them different colours.
Anyone know if this can be done easily?
EDIT: Windows XP is my OS
SetConsoleTextAttribute() will let you set the color of subsequent text output.
http://msdn.microsoft.com/en-us/library/ms686047.aspx
You'll probably want to look at the complete set of Win32 console APIs to be able to get/set/restore and otherwise manipulate the console.
http://msdn.microsoft.com/en-us/library/ms682073.aspx
That's not possible in CMD (correct me if I'm wrong). You can only change the foreground and background color of CMD as a whole. Not by line, or word.
For changing its foreground and background colors please refer to the color command:
color /?

Resources