favorites menu style batch? good read.

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Mason
Posts: 4
Joined: 28 Jan 2009 18:02
Location: 3 Ethical Hackers dot com
Contact:

favorites menu style batch? good read.

#1 Post by Mason » 28 Jan 2009 18:13

@echo off
color 1a
:start
echo Key:
echo.
echo --------------------------------------------------------------
echo.
echo 1 = Google
echo 2 = 3 Ethical Hackers
echo 3 = Metacafe
echo 4 = YouTube
echo 5 = Battle.net Website
echo 6 = Guitar Tabs
echo.
echo --------------------------------------------------------------
echo Press "e" to exit.
echo.
echo --------------------------------------------------------------
echo.
echo Enter the number of the website you wish to visit:
set /p input=
echo.
if %input%==1 start www.google.ca
if %input%==2 start www.3ethicalhackers.com
if %input%==3 start www.metacafe.com
if %input%==4 start www.youtube.com
if %input%==5 start www.Battle.net
if %input%==6 start www.911tabs.com
if %input%==e goto exit

cls
echo.
echo --------------------------------------------------------------
echo.
echo Press "e" to exit, "b" to select another site.
echo.
set /p input=
if %input%==e goto exit
if %input%==b goto start
echo.
:exit
echo --------------------------------------------------------------
echo.
echo you can change the sites to whatever you want. thanks for using
echo.
pause
exit

_m
Posts: 6
Joined: 27 Jan 2009 10:56

#2 Post by _m » 28 Jan 2009 20:00

Code: Select all

@ECHO OFF
:START
CLS
ECHO.1. Google
ECHO.2. 3 Ethical Hackers
ECHO.3. Metacafe
ECHO.4. YouTube
ECHO.5. Battle.net Website
ECHO.6. Guitar Tabs
ECHO.
ECHO.0. Exit
ECHO.
(SET OPTION=)
(SET /P OPTION="> ")
IF NOT DEFINED OPTION (GOTO:START)
FOR /L %%A IN (0,1,6) DO (
IF ^%OPTION:~0,1%==^%%A (GOTO:_%%A)
)
GOTO:START
:_0
EXIT
:_1
START WWW.GOOGLE.COM
GOTO:START
:_2
START WWW.3ETHICALHACKERS.COM
GOTO:START
:_3
START WWW.METACAFE.COM
GOTO:START
:_4
START WWW.YOUTUBE.COM
GOTO:START
:_5
START WWW.BATTLE.NET
GOTO:START
:_6
START WWW.911TABS.COM
GOTO:START

Post Reply