Solved 5 seconds to select option or do somethin els

February 9, 2011 at 18:25:12
Specs: Win 7 Ultimate , 4.17Ghz 8GB ram
I want to create a batch file that will give the user 5 seconds to select/type something
If he doesnt then it will go to something else

See More: 5 seconds to select option or do somethin els

Report •


#1
February 10, 2011 at 06:31:08
This is what i could establish, it's not working but if you make some changes it might work :P

Edited but still doesnt work :P

@echo off
SET /a newtimer=5
echo This is IlliXXion's 5 second chooser file
echo Press any button you want to go on
pause
echo YOU HAVE 5 SECONDS TO COMPLETE THIS! THE QUESTION WILL APPEAR SOON.
ping localhost -n 3 >nul
echo What's 1+4? Seconds Left: %newtimer%
SET /a newtimer-=1
ping localhost -n 2 >nul
SET /a newtimer-=1
ping localhost -n 2 >nul
SET /a newtimer-=1
ping localhost -n 2 >nul
SET /a newtimer-=1
ping localhost -n 2 >nul
SET /a newtimer-=1
set input=
set /p input=
if %newtimer%==0 goto FAIL
if %input%== 5 goto Success

:Success
echo You made it! lol
pause

:FAIL
echo You failed...
pause


Report •

#2
February 10, 2011 at 14:33:41
✔ Best Answer
which OS you are in ? If its windows vista or windows 7 check out Choice /? command.

it does exactly what you are looking for

Subhash Chandra.
www.s-chandra.co.cc


Report •
Related Solutions


Ask Question