First post, by jparnell8839
OK, so I installed DOSbox for 1 simple reason: to play X-Com 😜 (months ago, mind you. I've installed a bunch of games now)
After a couple days of playing it, I realized what I had forgotten oh so long ago: X-Com is hard, painstaking, and frustrating. Thusly, I set out to download a DOS based saved game editor.
Now, it editing things, and testing them out, I got tired of:
cwxce\edit\xcomedit.exe
cd xcom
ufo.bat
cd ..
cwxce\edit\xcomedit.exe
etc, etc, etc...
So I wrote a batch file that is in my DOSbox startup directory called x.bat (yes, I'm lazy).
essentially, start the bat, runs the editor, upon close asks you if you would like to run X-Com. Yes, it runs X-com, No it returns to DOS. After it runs X-Com, it asks if you would like to run the editor. Yes, it loops, no, it returns to DOS.
Only problem is: as soon as I launch the batch file, it freezes up. Gotta CTRL + ALT + DELETE it and use the keyboard to kill the DOSbox process cuz the mouse renders non-responsive.
Here's my code:
@echo offecho Hacking X-Com...pausecd cwxce\editxcomedit.execls:askSET /P ANSWER=Do you want to launch X-Com? (Y/N)?if %ANSWER% == y goto :yesif %ANSWER% == yes goto :yesif %ANSWER% == Y goto :yesif %ANSWER% == YES goto :yesif %ANSWER% == Yes goto :yesif %ANSWER% == n goto :noif %ANSWER% == no goto :noif %ANSWER% == N goto :noif %ANSWER% == NO goto :noif %ANSWER% == No goto :nogoto :ask:yesecho Launching X-Com...pausecd ..\..cd xcomufo.batcls:ask2SET /P ANSWER2=Do you want to hack X-Com? (Y/N)?if %ANSWER2% == y goto :yesif %ANSWER2% == yes goto :yesif %ANSWER2% == Y goto :yesif %ANSWER2% == YES goto :yesif %ANSWER2% == Yes goto :yesif %ANSWER2% == n goto :noif %ANSWER2% == no goto :noif %ANSWER2% == N goto :noif %ANSWER2% == NO goto :noif %ANSWER2% == No goto :nogoto :ask2:yesecho Hacking X-Com...pausecd cwxce\editxcomedit.execlsgoto :end:noclsgoto :end:nocls
goto :end:endecho Returning to DOS...Pausecd C:\DOScls
I thought maybe that the batch was taking up too much memory, however, it freezes up even in this simplest of batches:
@echo off:askSET /P ANSWER2=Do you like DOS? (Y/N)?if %ANSWER2% == y goto :yesif %ANSWER2% == n goto :nogoto :ask:yesecho Fantastic!pauseclsgoto :end:noecho Too bad...pauseclsgoto :end:endclscd: ..\Windows
I've written numerous batch files to act as shortcuts to other things in DOSbox and they've never rendered it non-responsive. I have a strong feeling its the IF/THEN statement that's doing this.... is there a workaround I'm not aware of? I cant seem to find anything about it in either this forum or across the entire interwebs.
I've tested my batch file in the CMD prompt, replacing the executable (for the editor) and batch file (for launching X-Com) with simple "echo This is the editor" and "echo This is X-com". It all works in windows, just not in DOSbox 🙁
Any help you can give me would be greatly appreciated.
FYI:
OS: Win7 SP1 x64
DOSbox ver: 0.74
Need any other info, let me know...