Batch Favorite Website
Hello Instructables! I am BatchBum and I make batch Instructables. Today I will be making a batch script shortcut to your favorite website. P.S. Any bolded words are instructions from me so you don't get mixed up with the commands.
Runthrough
Before we begin I would like to tell you we are using c# programming and I would like to show you some common commands.
@echo off: Turns off that C:\Users\Username\ junk.
cls: Clears the page. (Keeps it nice and neat.)
echo.: Just spacing so your writing doesn't jet all cramped together.
echo: Put this be for any text you want to write.(e.g. echo Hello Everyone!)
pause: Makes the file say Press any key to continue... And it does make you.
exit: This is pretty self explanatory, but exits out of the batch script.
set /p WHATEVER: Just a choice command, except WHATEVER is not a command it is just in place for another of the many commands.
if: Another command for choice but it is used in set /p ---.
•: This isn't really a command but a makes a single beep for every bullet point.
color: Changes the color of background or text.
timeout: A timer that counts down an amount of numbers you set
Notepad
First open notepad. Type:
@echo off
cls
color 8A
This will work on Windows XP, 7, and 8.
No promises on Windows 98, 95, or older.
More Commands
Now after what you just typed add this.
echo.
echo Welcome to the Your Favorite Website WIZZARD!
echo.
pause
cls
echo.
echo If you would like to move on type 1 if you would like to exit type 2
echo.
Remember to always enter after every command.
Now you should have:
@echo off
cls
color 8A
echo.
echo Welcome to the Your Favorite Website WIZZARD!
echo.
pause
cls
echo.
echo If you would like to move on type 1 if you would like to exit type 2
echo.
Yet Again MORE Commands
This is the last set of commands. Add this to the end:
set /p variable=
if %variable% equ 1 goto 1
if %variable% neq 1 goto 2
:1
cls
color A
echo.
echo NOW ENTERING WEBSITE...
timeout 5
start iexplore
exit
:2
cls
color A
echo.
echo NOW EXITING...
timeout 5
exit
For this to work you must type the URL of your favorite website after "start iexplore" like in the picture. Your set of commands should look like this:
@echo off
cls
color 8A
echo.
echo Welcome to the Your Favorite Website WIZZARD!
echo.
pause
cls
echo.
echo If you would like to move on type 1 if you would like to exit type 2
echo.
set /p variable=
if %variable% equ 1 goto 1
if %variable% neq 1 goto 2
:1
cls
color A
echo.
echo NOW ENTERING WEBSITE...
timeout 5
start iexplore
exit
:2
cls
color A
echo.
echo NOW EXITING...
timeout 5
exit
Just a reminder all this has to be written in notepad.
FINISH
Save the file as webwiz.bat
REMEMBER TO WRITE .bat after with no space in between.
Pictures
Here are some pictures of how it should turn out if you did it right.
Please Like Comment And Follow!