Baron of Hell
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Misc. > Everything Else > Batch File help?
 
Author
All times are GMT. The time now is 13:40. Post New Thread    Post A Reply
Kagemaru_H
Banned


Posts: 422
Registered: 09-09


I made a batch file for Chocolate Doom to be able to run Ultimate Doom, Doom II, and Final Doom, but it kept closing down when I tried to run it. I'm very inexperienced when it comes to batch files, so I'm sure someone could point out something missing here.
code:
echo off cls ECHO Welcome to Chocolate doom. Select the game you would like to play. ECHO. ECHO. ECHO 1=Doom II: Hell on Earth ECHO 2=The Ultimate Doom ECHO 3=Final Doom - TNT Evilution ECHO 4=Final Doom - The Plutonia Experiment ECHO 5=Quit ECHO. If ERRORLEVEL=5 GOTO WUSS If ERRORLEVEL=4 GOTO PLUTONIA IF ERRORLEVEL=3 GOTO TNT IF ERRORLEVEL=2 GOTO DOOM IF ERRORLEVEL=1 GOTO DOOM2 GOTO END :DOOM2 chocolate-doom -iwad doom2.wad :DOOM chocolate-doom -iwad doom.wad :TNT chocolate-doom -iwad tnt.wad :PLUTONIA chocolate-doom -iwad plutonia.wad :WUSS ECHO Bye-bye! exit

Old Post 02-21-10 20:38 #
Kagemaru_H is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Planky
Senior Member


Posts: 1108
Registered: 12-02


You are missing the CHOICE command - without it, errorlevel never gets set and therefore quits...

Insert "choice /C 12345" below "ECHO." and it should work.

Old Post 02-21-10 23:58 #
Planky is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Kagemaru_H
Banned


Posts: 422
Registered: 09-09


Nevermind, I have this all figured out.
code:
@echo off cls ECHO Welcome to Chocolate doom. Select the game you would like to play. ECHO. ECHO. ECHO 1 = Doom II: Hell on Earth ECHO 2 = The Ultimate Doom ECHO 3 = Final Doom - TNT Evilution ECHO 4 = Final Doom - The Plutonia Experiment ECHO 5 = Setup ECHO 6 = Quit ECHO. :choice set /P C=[1,2,3,4,5,6]? if "%C%"=="6" goto END if "%C%"=="5" goto SETUP if "%C%"=="4" goto PLUTONIA if "%C%"=="3" goto TNT if "%C%"=="2" goto DOOM if "%C%"=="1" goto DOOM2 goto choice :DOOM2 chocolate-doom -iwad doom2.wad goto END :DOOM chocolate-doom -iwad doom.wad goto END :TNT chocolate-doom -iwad tnt.wad goto END :PLUTONIA chocolate-doom -iwad plutonia.wad goto END :SETUP chocolate-setup :END exit


Chocolate Doom users, take my cue. This would make use of this port easier and less bulky than individualizing games into batches.

Also, I made a thread with an improved version of my Frontend batch (ability to load a PWAD of the user's choice for all games) in the Source Ports section, so mods, this thread can be done away with.

Last edited by Kagemaru_H on 02-22-10 at 00:58

Old Post 02-22-10 00:38 #
Kagemaru_H is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Aliotroph?
postCount++


Posts: 1643
Registered: 03-02


Ahh, batch files. I ought to spend a bit of time with those one day. I'm surprisingly ignorant of what you can use in a batch file. For this kind of thing I'd probably write a launcher with a GUI.

Old Post 02-22-10 02:52 #
Aliotroph? is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 13:40. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Misc. > Everything Else > Batch File help?

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Forums Directory