0 Replies - 1426 Views - Last Post: 04 May 2011 - 01:44 PM

#1 Creecher   User is offline

  • I don't care
  • member icon

Reputation: 562
  • View blog
  • Posts: 2,049
  • Joined: 06-March 10

Batch Launcher

Posted 04 May 2011 - 01:44 PM

Description: Read the comments.Launch your websites through CMD.
:: First we get rid of the ugly C:/Windows crap
@echo off
:: Set the color to a nice phosphourus green. #00FF00 for you people that love this color, I know I do (it's the main color scheme on my website :D )
color 0a
:: Set the title of the file, get rid of the CMD.exe stuff
title Website Launcher
:: Call the loop that will be used later.
:: Display what we want in our launcher.
echo Website Launcher
::Display a linebreak so we have some spacing.
echo 1. www.dreamincode.net
echo 2. www.google.com
echo 3. www.last.fm
echo 4. www.freewebarcade.com
echo 5. www.neverpool.com
echo 6. Exit
:: Another loop, if you hit a wrong option, it reloops itself.
echo Enter your option :
:: Insert your command
set /p opt=
:: Pretty simple. If 1 was inserted into the command prompt, then it goes to the one variable. 
if %opt%==1 goto one
:: Call more variables.
if %opt%==2 goto two
if %opt%==3 goto three
if %opt%==4 goto four
if %opt%==5 goto five
if %opt%==6 goto six
:: in order to add a new option, call it like so: [if %opt%==7 goto seven] then call the variable information below, just like the others. 
:: Anything other than a valid option will echo this.
echo Invalid Option
goto first
:: :one calls the 'one' variable
:: This will open your URL in your default web browser.
explorer http:\www.dreamincode.net
:: Clear the screen to reduce clutter
:: After the screen clears, go back to the loop declared as :loop and re-echo your URL list. 
goto loop
explorer http:\www.google.com
goto loop
explorer http:\www.last.fm
goto loop
explorer http:\www.freewebarcade.com
goto loop
explorer http:\www.neverpool.com
goto loop
:: Closes the CMD and stops running your .bat file. 

Is This A Good Question/Topic? 0
  • +

Page 1 of 1