Doom Marine
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 > Classic Doom > Source Ports > Batch file tricks
 
Author
All times are GMT. The time now is 01:57. Post New Thread    Post A Reply
Mike.Reiner
Member


Posts: 624
Registered: 01-05


I'm not really much for front ends, and I mostly use batch files for all my needs, but as you could imagine, I would have to edit the file by hand every time i wanted to use a different engine to play. Yeah, I know there are front ends. No, I don't want to use one.

I've done a little bit of searching and I haven't been able to find anything that seems to be useful, so I apologize if somebody finds an answer on their first google search attempt.

What I'm trying to do is take a batch file, place two (or more) possible commands in it, and have it execute one of those commands depending on which key I press. So for example, let's say I have these two commands for playing Alien Vendetta:

code:
set DOOMSAVEDIR=.\engines\PrBoom+\Batch\Save\av start .\engines\PrBoom+\batch\glboom-plus.exe -iwad .\engines\vanilla\doom2\doom2.wad -file .\pwads\av.wad -deh .\pwads\av.deh -complevel 2 and start .\engines\gzdoom\batch\gzdoom.exe -iwad .\engines\vanilla\doom2\doom2.wad -file .\pwads\av.wad -file .\pwads\av.deh


As you could infer, one of those commands will launch the specified files using GlBoom-Plus, while the other will launch it using GZDoom.

Is there some way I can make the batch ask me which one I want and perform the according task I choose?

Old Post 06-21-09 17:57 #
Mike.Reiner is offline Profile || Blog || PM || Email || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
entryway
Senior Member


Posts: 1758
Registered: 01-04



Mike.Reiner said:
Is there some way I can make the batch ask me which one I want and perform the according task I choose?

prboom-plus-2.5.0.2-win32.zip\start.bat

In NT based you can use something like:

code:
set /p letter=[gzdoom (g) / prboom-plus (p)] if "%letter%" == "g" ( start gzdoom.exe ) else ( start glboom-plus.exe )


or

code:
set /p letter=[g/p2/p9] if "%letter%" == "g" goto gzdoom if "%letter%" == "p2" goto prboom_complevel_2 if "%letter%" == "p9" goto prboom_complevel_9 goto end :gzdoom start gzdoom.exe goto end :prboom_complevel_2 set DOOMSAVEDIR=.\prboom-plus-saves\ start glboom-plus.exe -complevel 2 goto end :prboom_complevel_9 start glboom-plus.exe -complevel 9 goto end :end

Last edited by entryway on 06-21-09 at 20:52

Old Post 06-21-09 20:15 #
entryway is offline Profile || Blog || PM || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
Mike.Reiner
Member


Posts: 624
Registered: 01-05


Oh fantastic. Thank you very much!

I opted for the second option you provided, as I am setting the batch files to give me more than two options.

Last edited by Mike.Reiner on 06-21-09 at 22:38

Old Post 06-21-09 22:13 #
Mike.Reiner is offline Profile || Blog || PM || Email || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
All times are GMT. The time now is 01:57. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > Batch file tricks

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