How do you make a (Y/N) at the end of a question actually work? for example
Would you like to start the "Matrix simulator" (y/n) and Y would make it continue to whatever and n would close the box. Is there anyway to do that? oh and i run on XP SP2
Perhaps you've seen it done in the past? If so, and it was on an older computer, then it was probably done with the choice command.
I understand that choice.com in not available with a WinXP installation.
However - you can add it.
You can download choice here:
http://hp.vector.co.jp/authors/VA007219/dkclonesup/choice.htmlPut it in a directory that is in your path.
Then experiment with a batch file like this one:
@echo off
choice Would you like to start the "Matrix simulator
if errorlevel 2 goto no
if errorlevel 1 goto yes
:no
rem put commands here
echo This is what you get when you hit N
goto end
:yes
rem put commands here
echo This is what you get when you hit Y
goto end
:end
(Note: if you are not familiar with checking for return codes (errorlevels), do
remember to do it in descending order. )
As with anything like this, you experiment at your own risk.
I will say that the above batch file text is cut and pasted from my computer, where I played with it and it didn't blow up anything.
It is a super simple little batch file, but it should get your going in the right direction.
Now you've got the modern way, from previous posts, of how to do it.
And you've got the old way. The way your question was worded, it just seemed like you should also know where the old [Y,N]? came from.