![]() |
|
[Shell] Easy multiple colors in batch - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Shell] Easy multiple colors in batch (/showthread.php?tid=3971002) |
Easy multiple colors in batch - ɩᴄᴀʀᴜȿ ᴌוᴠᴇѕ™ - Jan 3, 2014 I'll be explaining a much simpler way to have multiple color text in batch. First a quick look at the code before I explain it. Code @Echo offOkay, so first we see Code MD TemporaryFolderNext we see Code Echo Press ENTERThen you see Code set /p ".=Text after colored text 1" <nul >"Text 1 to color"Finally we see the bread and butter of this script. This is the main piece of this script to give it the color Code findstr /A:0E /S /C:"Text after colored text 1" "Text 1 to color"
And at the end, Code CD..There are multiple ways of coloring text as I've posted in the batch section, but this is by far the simplest. I hope you all enjoyed this :) PM me if you have any questions! Another method of multi colored text. Code @Echo OffMy favorite Method Code @Echo off & Setlocal EnableDelayedExpansionLast method Code @echo off* - Options - Jan 3, 2014 Thanks! I will implement this in Cookie Clicker just for fun :) I was looking for this kind of explanation before but I couldn't find it so I did not add colors to my scripts. :/ * - ɩᴄᴀʀᴜȿ ᴌוᴠᴇѕ™ - Jan 3, 2014 (Jan 3, 2014 03:31 AM)Options Wrote: Thanks! I will implement this in Cookie Clicker just for fun :) I was looking for this kind of explanation before but I couldn't find it so I did not add colors to my scripts. :/ Well you should know that you can always pm me for help ^-^ I always put it in my threads * - Nakamoto. - Jan 3, 2014 Nice job, you have definitely improved from when you first joined. You have some amazing tutorials and you are very knowledgeable in batch now. This is just another one of your great guides. * - ɩᴄᴀʀᴜȿ ᴌוᴠᴇѕ™ - Jan 4, 2014 (Jan 3, 2014 09:40 PM)RenRioku™ Wrote: Nice job, you have definitely improved from when you first joined. You have some amazing tutorials and you are very knowledgeable in batch now. This is just another one of your great guides. [img]http://cdn.alltheragefaces.com/img/faces/png/happy-oh-stop-it-you.png[/img] * - Recoome - Jan 31, 2015 Thanks for this I write my own experimental batch scripts for ehmm.. experimental purposes and this could really help out! Thanks * - SIM-1895736 - Jan 31, 2015 Thank you for this mate. I'm writing a simple batch programe now a days and will insert this too (just for fun ;) * - nsevyd - Aug 28, 2015 This is a very nice way of doing it, thanks! * - oramck - Sep 7, 2015 Greaat work, Tks for sharing this! * - en3rgizz - Sep 29, 2015 Greaat work, its verry good tutorial. * - Seymour_Birkhoff - Oct 3, 2015 i just learned how to make batch files and was very curious as to how to do this. i even tinkered around hoping i would find a fix. * - DataBuster - Jan 20, 2017 I personally always rename ":ColorEcho" to ":color", that's way quicker to type. |