It basically does everything I wanted to for my color customization concept that you and I did Thanks for testing
Invalid characters :/ I discovered though that these input characters through an error or send user to mainmenu Should I add them to the invalid character list? Code: +, =, :, :, /, ?
Putting all egos aside, I prefer the following as it is more bullet proof. Code: set /p txtclr= ^ Text Color: echo=%txtclr%|findstr/bir "[0-9A-G]">nul&&(set txtclr=%txtclr:~,1%)||(goto color) if /i "%txtclr%"=="G" goto mainmenu set /p bkg= ^ Background Color: echo=%bkg%|findstr/bir "[0-9A-G]">nul&&(set bkg=%bkg:~,1%)||(goto color) if /i %bkg%==%txtclr% goto color if /i "%bkg%"=="G" goto mainmenu @COLOR %bkg%%txtclr% Both scripts do the job.
Sorry my vibe meter is broken. Besides vibe is too subjective. Who cares what people say. Do what is good for RW... Ctrl-M (ASCII code 0x0D)
I know what drives your emotions. Frankly, all software developers have EGO. being aware of it and controlling is a challenge. This script is a good example when it's better to focus on what is allowed rather than what is not. as the allowed set is much smaller. Would you, therefore, consider the following: Code: set /p txtclr= ^ Text Color: if /i "%txtclr%"=="G" goto mainmenu if /i "%txtclr%"=="0" goto get_bkg_color if /i "%txtclr%"=="1" goto get_bkg_color if /i "%txtclr%"=="2" goto get_bkg_color if /i "%txtclr%"=="3" goto get_bkg_color if /i "%txtclr%"=="4" goto get_bkg_color if /i "%txtclr%"=="5" goto get_bkg_color if /i "%txtclr%"=="6" goto get_bkg_color if /i "%txtclr%"=="7" goto get_bkg_color if /i "%txtclr%"=="8" goto get_bkg_color if /i "%txtclr%"=="9" goto get_bkg_color if /i "%txtclr%"=="A" goto get_bkg_color if /i "%txtclr%"=="B" goto get_bkg_color if /i "%txtclr%"=="C" goto get_bkg_color if /i "%txtclr%"=="D" goto get_bkg_color if /i "%txtclr%"=="E" goto get_bkg_color if /i "%txtclr%"=="F" goto get_bkg_color goto color :get_bkg_color set /p bkg= ^ Background Color: if /i "%bkg%"=="G" goto mainmenu if /i "%bkg%"=="0" goto compile_color if /i "%bkg%"=="1" goto compile_color if /i "%bkg%"=="2" goto compile_color if /i "%bkg%"=="3" goto compile_color if /i "%bkg%"=="4" goto compile_color if /i "%bkg%"=="5" goto compile_color if /i "%bkg%"=="6" goto compile_color if /i "%bkg%"=="7" goto compile_color if /i "%bkg%"=="8" goto compile_color if /i "%bkg%"=="9" goto compile_color if /i "%bkg%"=="A" goto compile_color if /i "%bkg%"=="B" goto compile_color if /i "%bkg%"=="C" goto compile_color if /i "%bkg%"=="D" goto compile_color if /i "%bkg%"=="E" goto compile_color if /i "%bkg%"=="F" goto compile_color goto color :compile_color @COLOR %bkg%%txtclr%
Might I also suggest that instead of adding the chosen color combination to the registry on each change that it is done, to do so only after the end user has completed making their final selections. (i.e. instead of just going back to the mainmenu, do the registry change then goto mainmenu).
Only I know what is going on inside of me and if some douche's wants to act superior and macho then it's his ego that drives his posts not mine. I only wanted what's best for this script and have chosen well what to do, who to ask for help and how to design it given massive testing that no one else did but my staff and I!!!!!!!! But allowing people who bash MDL and it's solutions to participate in my code is worse than having no code, seriously This is a solution done by good hearted people and it's created for who can't afford W7 or batch enthusiasts. It provides all W7/Office 2013 ISO's, ISO instructions and all URL links to get all that is needed including support. And I put no credits in RW because it is a solution for the whole World not to satisfy my ego ...lol Just cause someone loves their project and doesn't take s**t from asshats doesn't mean their in their ego, it just means they have much heart for what is not just done for themselves but the world and those in it who like the rearm concept that I developed since 2010 People can hide things in words and sometimes what seems the most neutral and unbiased opinion is the most entrenched in ego so... Hence sometimes we're not giving advice to others but actually ourselves And to be honest what drives me is passion and MDL's unwavering support and understanding from it's members, staff and owner Being aware of the difference between my passion, being protective of my staff/project and what ego really is, is what I think might enlighten you I wanted the allowed options originally but I like to give code for people to work on so it starts out as it does and Humphrey did a good job! Will look at your code and make a decision what to do Thank you
My proposed code is easy to understand, easy to debug and allows for a set of 17 characters. All other keys (e.g. "()*&^%$#@!~`" ) are all rejected and there's no need to spell them out...
You should goto mainmenu1 only if both %bkg% and %txtclr% have a valid value. Imagine a case when a user enters 'G' without going through the cycle of defining text and bkg colors. I will take a deeper look later today... so I hope...
This seems to do the trick: Code: set colors_defined=0 :Color title Color Customization set bkg= set txtclr= mode con: cols=21 lines=22 CLS echo. echo Color Customization echo. echo 0 = Black echo 1 = Blue echo 2 = Green echo 3 = Aqua echo 4 = Red echo 5 = Purple echo 6 = Yellow echo 7 = White echo 8 = Gray echo 9 = Light Blue echo A = Light Green echo B = Light Aqua echo C = Light Red echo D = Light Purple echo E = Light Yellow echo F = Bright White echo G = Rearm Wizard echo. set /p txtclr= ^ Text Color: if /i "%txtclr%"=="G" goto mainmenu1 if /i "%txtclr%"=="0" goto get_bkg_color if /i "%txtclr%"=="1" goto get_bkg_color if /i "%txtclr%"=="2" goto get_bkg_color if /i "%txtclr%"=="3" goto get_bkg_color if /i "%txtclr%"=="4" goto get_bkg_color if /i "%txtclr%"=="5" goto get_bkg_color if /i "%txtclr%"=="6" goto get_bkg_color if /i "%txtclr%"=="7" goto get_bkg_color if /i "%txtclr%"=="8" goto get_bkg_color if /i "%txtclr%"=="9" goto get_bkg_color if /i "%txtclr%"=="A" goto get_bkg_color if /i "%txtclr%"=="B" goto get_bkg_color if /i "%txtclr%"=="C" goto get_bkg_color if /i "%txtclr%"=="D" goto get_bkg_color if /i "%txtclr%"=="E" goto get_bkg_color if /i "%txtclr%"=="F" goto get_bkg_color goto color :get_bkg_color set /p bkg= ^ Background Color: if /i "%bkg%"=="G" goto mainmenu1 if /i "%bkg%"=="0" goto compile_color if /i "%bkg%"=="1" goto compile_color if /i "%bkg%"=="2" goto compile_color if /i "%bkg%"=="3" goto compile_color if /i "%bkg%"=="4" goto compile_color if /i "%bkg%"=="5" goto compile_color if /i "%bkg%"=="6" goto compile_color if /i "%bkg%"=="7" goto compile_color if /i "%bkg%"=="8" goto compile_color if /i "%bkg%"=="9" goto compile_color if /i "%bkg%"=="A" goto compile_color if /i "%bkg%"=="B" goto compile_color if /i "%bkg%"=="C" goto compile_color if /i "%bkg%"=="D" goto compile_color if /i "%bkg%"=="E" goto compile_color if /i "%bkg%"=="F" goto compile_color goto color :compile_color set selectedtxt=%txtclr% set selectedbkg=%bkg% @COLOR %selectedbkg%%selectedtxt% set colors_defined=1 :mainmenu1 IF %colors_defined%==1 ( reg add "HKCU\Software\Microsoft\Command Processor" /t REG_DWORD /v DefaultColor /d 0x%selectedbkg%%selectedtxt% /f >NUL ) ELSE ( goto color ) IF '%ERRORLEVEL%' EQU '0' ( goto color ) ELSE ( goto mainmenu ) pause
That is the way to do it although it doesn't really improve anything just makes the code more efficient which user will never notice and setting reg key after color selection is no big deal Great coding though Will post RW Final tonight and finalize first post as well TS
Ok so used this final RW final and after restarting the windows activation thing popped out BUT it closed itself. I still have the watermark and when I go to system properties it says I have to activate. Rearm count still 0. I have changed my theme and have gotten no nag screen yet. Will report back if Windows tells me to activate again but if the nag screens are gone forever, I can live with the watermark. Fingers crossed.
I just picked up a few of TSes latest posts here where she addresses Compo....and they are IMHO Off Topic here @ a dev. thread....yes name calling... First: TS you have NO staff and you have no copyright and you have no thread. This means you own here nothing. Hence you cannot wish that somebody should keep away from 'your' thread. It is quite easy, either you recognize that somebody just like Compo is able to improve your project and has the skills to, or you just don't want people to help and improve your project. But without others your project would be just not that good as it is now. Please say clearly to the one what you want...and refrain from that 'star wars false name quotings' and name calling..Compo came here to help (which is the stength of a community), if he did, give him credits...just like the developers are doing on XDA.... TS; you are the founder of your projects, you are the one who decides how they go on. You are responsible for them... You can deny somebody's ideas / help, no problem. Say that then, with reasonable agruments, but no drama!!! But you don't own staff, you don't own a thread here. You are the thread starter. To make that clear: The contents belong to the MDL community. There is always somebody who is more skilled than oneself...better get the one on board than to blame him. Or just make clear what you want without to dramatize it or calling names....here it is just a plain development thread which needs no drama. All I want is people to have a good relationship to each others here. If this is honestly your wish as well......then...go for it... Just my 2 cents... Thanks.