Can anyone help me with this simple code?
Posted: 30 May 2011 18:48
@ECHO Off
color FC
:choice
cls
echo Google = g
echo Facebook = f
echo Gmail = m
echo.
set /p choice = "Hello, %username%, what would you like to do?"
if %choice% == g goto google
if %choice% == f goto Facebook
if %choice% == m goto Gmail
if %choice% == G goto Google
if %choice% == F goto Facebook
if %choice% == M goto Gmail
else goto errorchoice
:google
cls
@ECHO
start iexplore.exe "google url"
goto exit
:Facebook
cls
@Echo
start iexplore.exe "facebook url"
goto exit
:Gmail
cls
@Echo
start iexplore.exe "gmail url"
goto exit
:errorchoice
set /p error = "hey you entered a wrong choice!!"
pause
goto choose
:exit
cls
exit
color FC
:choice
cls
echo Google = g
echo Facebook = f
echo Gmail = m
echo.
set /p choice = "Hello, %username%, what would you like to do?"
if %choice% == g goto google
if %choice% == f goto Facebook
if %choice% == m goto Gmail
if %choice% == G goto Google
if %choice% == F goto Facebook
if %choice% == M goto Gmail
else goto errorchoice
cls
@ECHO
start iexplore.exe "google url"
goto exit
cls
@Echo
start iexplore.exe "facebook url"
goto exit
:Gmail
cls
@Echo
start iexplore.exe "gmail url"
goto exit
:errorchoice
set /p error = "hey you entered a wrong choice!!"
pause
goto choose
:exit
cls
exit