1 Replies - 540 Views - Last Post: 19 September 2012 - 11:34 AM Rate Topic: -----

#1 bradwatt6  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 19-September 12

improvement: make batch file better

Posted 19 September 2012 - 11:32 AM

I am writing a dashboard type of program that gives easy accsess to websites, apllications, and opening .exe files. Thr problem is the .bat interface does not look very good at all and does not have many feautures. What language should I write my code in? And to add an interface/ GUI, or just at least some workable buttons, like a real program would have, how could I do that?

Here is my code to the program :

[:start
@echo off
COLOR 1E
cls
echo Welcome to Wannow Dashboard. This is the main page.
echo Type in the number to be redirected to your desired location.
echo 1. Useful Websites
echo 2. Programs
echo 3. Computer Commands
echo Wannow Dashboard created by Brad Wannow

set/p var1=
if %var1% == 1 goto Websites
if %var1% == 2 goto program
if %var1% == 3 goto command
pause
exit

:websites
COLOR 1E
cls
echo Welcome to Wannow Dashboard: Websites. Select a command, type in number to be redirected.
echo 1. www.Pandora.com
echo 2. www.Google.com
echo 3. Aventa Blackboard
echo 4. Other
@echo OFF

@echo %time%
ping -n 1 -w 1 127.0.0.1 1>nul
echo Wannow Dashboard created by Brad Wannow

set/p var2=
if %var2% == 1 goto pandora
if %var2% == 2 goto google
if %var2% == 3 goto aventa
if %var2% == 4 goto other
cls
pause
GOTO start

:google
cls
START www.google.com
msg * Here, is Google.com, thank you for using the Wannow Dashboard.
pause
GOTO continued


:pandora
msg * Here is Pandora.com, thank you for using the Wannow Dashboard.
START www.pandora.com
pause
GOTO continued

:aventa
msg * Here is Aventa Blackboard, thank you for using the Wannow Dashboard.
START http://aventa.blackboard.com/
pause
GOTO continued

:continued
COLOR1E
@echo off
cls
echo Now that you have gone to your desired location, is there anything else you would like to do?
pause
stop

:program
Color 1e
cls
echo This is Wannow Dashboard: Programs (To go back to start, simply type back)
echo Welcome, here you can access some of your files easily.
echo What would you like to open?
echo 1. Internet Explorer
echo 2. Firefox
echo 3. Calculator

set/p var3=
if %var3% == 1 Start iexplore.exe
if %var3% == 2 Start Firefox.exe
if %var3% == back goto start
if %var3% == 3 Start Calc.exe
pause
GOTO start

:other
echo Please type in the website you would like to go to, using www. and .com
set /P theuserinput="Enter the website"
Start %theuserinput%
pause
exit

:command
echo What would you like to do?
echo 1.shutdown
echo 2.restart
echo 3.logoff

set/p var5=
if %var5% == 1 shutdown -s
if %var5% == 2 shutdown -r
if %var5% == 3 shutdown -l
pause
exit]

Or, look how the files runs itself. Thank you for any help possible.

Is This A Good Question/Topic? 0
  • +

Replies To: improvement: make batch file better

#2 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10803
  • View blog
  • Posts: 40,273
  • Joined: 27-December 08

Re: improvement: make batch file better

Posted 19 September 2012 - 11:34 AM

Please avoid duplicate posting.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1