Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Shell 

[Batch] Multi-coloring

Hello! I made this thread as many people seem to not know how to use multiple colors on the same line of text or several lines of text in batch. I did not originally make this script I just tweaked it a bunch.

This would go at the beginning of your script after "@echo off" (if used):
PHP Code

<?php 
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do     rem"') do (
  
set "DEL=%%a"
) 

Now, this piece of code would go at the very end of your code, after all the functions you wish to implement color into:
PHP Code

<?php 
:colorEcho
<nul set /p ".=%DEL%" > "%~2"
findstr /v /a:%1 /R "^$" "%~2" nul
del 
"%~2" > nul 2>&1i 

Now, to utilize this, we will use the 'call' function.
Example:
PHP Code

<?php 
call 
:colorEcho 0a "text1"
call colorEcho 0b " text2" 
This would display text1 text2
on the same line. In order to separate the lines so it displays as
"text1."
"text2."
It would look like this:
PHP Code

<?php 
call 
:colorEcho 0a "text1" & echo.
call :colorEcho 0b "text2" & echo. 

That is all! You now have multicolored text <3
You literally copied the script above from this thread made by Icarus.

Also, how is this a tutorial? You never really explained how the code works...only how to use it.

ScriptKiddy 🤫 Just leave...
If it isnt yours dont use it, ok?
Some one had the hard job to do it
This was (at least partially) original research by IcarusLives, and this user has copied it and tried to present it as their own work.
I guess OP is looking forward to their new career as a Red Apple Cart Pusher..
There are bits and pieces of this code everywhere. I now actually use a modified version of what OP posted, since I find it cleaner, and more effective. This is my own, not only that, but I've found a replacement backspace symbol that I use instead of generating one.
I found the first part of the code myself, but odviously didn't work so I completed it. I guess I will go to my own forum if this forum doesn't appreciate me.


And, like I said, I DID NOT MAKE THIS SCRIPT, I JUST TWEAKED IT!
To those of you saying I leeched it & was dishonest about it being mine need to READ THE FUCKING OP


(Sep 19, 2015 01:15 PM)Ventriloquism Wrote:  You literally copied the script above from -snip-

Also, how is this a tutorial? You never really explained how the code works...only how to use it.

ScriptKiddy 🤫 Just leave...

Only the first for /f statement is the same because I found it off yahoo answers then I added the second part. Look at the :colorText variable in that thread and compare it to mine, that I made myself.
Nobody suggested that you claimed to have written it.
Nevertheless, you copied some original content and posted it, without crediting the author.
We consider that bad behaviour. Do you understand why we feel that way?
Add credits/links to the sources you used and make clear what work you put into it. I'm sure most will let it go with that as long as it doesn't become a recurring thing.

Quote:I guess I will go to my own forum if this forum doesn't appreciate me.


Seriously? You're going to be melodramatic now? Its not cute. We don't care.

And seeing as you edited your post after the first comment calling you out.. you really have no right to say "READ THE FUCKING OP" seeing as you didn't admit to it from the beginning.
I've never seen the post about this before? I originally made this script back in '07.
(Jul 5, 2016 01:30 AM)Alumni Theorist Wrote:  I've never seen the post about this before? I originally made this script back in '07.

Lol, you still think you made this?
I made the tutorial ɩᴄᴀʀᴜȿ ᴌוᴠᴇѕ™ stole it from me haha joke very nice tutorial ɩᴄᴀʀᴜȿ ᴌוᴠᴇѕ™ thanks for sharing it with us.

FreeBooter!
This don't work good.
I see: Text1 #<-# Pres any button to continue
Text2 #<-# Pres any button to continue

FINDSTR: Don't find next /a

What to do?


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Shell] by Robert RougeSep 24, 2026 10:02 AM 4 220 Sep 24, 2026 10:02 AM
Last Post: Anonynuk
[Shell] by fisica638Oct 30, 2019 11:05 AM 1 536 Oct 30, 2019 11:05 AM
Last Post: Hackoo
[Shell] by HackooNov 25, 2017 06:35 AM 7 398 Nov 25, 2017 06:35 AM
Last Post: macfsn