Batch File

Locked
Kills On Site
Posts: 1741
Joined: Wed Jul 23, 2003 7:00 am

Batch File

Post by Kills On Site »

Well for school I need to create a DOS batch file that will promt for a choice of games and have a box made of asteriks surrounding the choices. The games are located on C:\GAMES\<game folder>\<game exe file>. The choices will start with 3 games and build up to about 12. Anyone able to help me with this?
[size=92][color=#0000FF]Hugh Hefner for President[/color][/size]
+JuggerNaut+
Posts: 22175
Joined: Sun Oct 14, 2001 7:00 am

Post by +JuggerNaut+ »

AmIdYfReAk
Posts: 6926
Joined: Thu Feb 10, 2000 8:00 am

Post by AmIdYfReAk »

do you NEED to do it in a dos/bat file? i mean XML/C/C+/VB would be actually be way more simple.
Kills On Site
Posts: 1741
Joined: Wed Jul 23, 2003 7:00 am

Post by Kills On Site »

Well it needs to be done in DOS bat commands.
[size=92][color=#0000FF]Hugh Hefner for President[/color][/size]
SOAPboy
Posts: 8268
Joined: Sun Apr 13, 2003 7:00 am

Post by SOAPboy »

Uh.. its pretty simple.. just google dos commands, you can pretty much figure it out yourself..

hint, Txt files are handy in this.. :)
[size=75][i]I once had a glass of milk.

It curdled, and then I couldn't drink it. So I mixed it with some water, and it was alright again.

I am now sick.
[/i][/size]
[img]http://img162.imageshack.us/img162/3631/171164665735hk8.png[/img]
User avatar
Scourge
Posts: 15559
Joined: Mon Mar 25, 2002 8:00 am

Post by Scourge »

Follow Juggz' link.
CheapAlert
Posts: 448
Joined: Tue Mar 19, 2002 8:00 am

Post by CheapAlert »

i used to have a bat menu maker somewhere from 87
Leader and director of the [url=http://cheapy.deathmask.net]OpenArena[/url] project which is a free software version of q3a designed for hobo fagts
Kills On Site
Posts: 1741
Joined: Wed Jul 23, 2003 7:00 am

Post by Kills On Site »

Well here is what I have so far.

@echo off
:Begin
cls
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo. *******************
echo. * A - Donkey Kong *
echo. * B - Mario *
echo. *******************
echo.
echo.
echo.
CHOICE /n /C:12 Pick a Game
If errorlevel ==2 goto 2Mario
If errorlevel ==1 goto 1Kong
goto end

:2Mario
C:\GAMES\MARIOBRO\Mario.exe
cls
goto end

:1Kong
C:\GAMES\DONKEYKO\ckong.exe
cls
goto end

:end
cls


the many echos are to get the menu choice in the center of the screen. There are also many spaces, but the forum doesn't show them. The only thing is we must make it so that when you exit the game the menu must reappear, which isn't that hard to do, but we need to enter in as an option, exit to DOS, how does one do that. I tried using an :away for an option, but it just exits no matter what you choose.
[size=92][color=#0000FF]Hugh Hefner for President[/color][/size]
Locked