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 off
echo Hacking X-Com...
pause
cd cwxce\edit
xcomedit.exe
cls
:ask
SET /P ANSWER=Do you want to launch X-Com? (Y/N)?
if %ANSWER% == y goto :yes
if %ANSWER% == yes goto :yes
if %ANSWER% == Y goto :yes
if %ANSWER% == YES goto :yes
if %ANSWER% == Yes goto :yes
if %ANSWER% == n goto :no
if %ANSWER% == no goto :no
if %ANSWER% == N goto :no
if %ANSWER% == NO goto :no
if %ANSWER% == No goto :no
goto :ask
:yes
echo Launching X-Com...
pause
cd ..\..
cd xcom
ufo.bat
cls
:ask2
SET /P ANSWER2=Do you want to hack X-Com? (Y/N)?
if %ANSWER2% == y goto :yes
if %ANSWER2% == yes goto :yes
if %ANSWER2% == Y goto :yes
if %ANSWER2% == YES goto :yes
if %ANSWER2% == Yes goto :yes
if %ANSWER2% == n goto :no
if %ANSWER2% == no goto :no
if %ANSWER2% == N goto :no
if %ANSWER2% == NO goto :no
if %ANSWER2% == No goto :no
goto :ask2
:yes
echo Hacking X-Com...
pause
cd cwxce\edit
xcomedit.exe
cls
goto :end
:no
cls
goto :end
:no
cls
goto :end
:end
echo Returning to DOS...
Pause
cd C:\DOS
cls
I thought maybe that the batch was taking up too much memory, however, it freezes up even in this simplest of batches:
@echo off
:ask
SET /P ANSWER2=Do you like DOS? (Y/N)?
if %ANSWER2% == y goto :yes
if %ANSWER2% == n goto :no
goto :ask
:yes
echo Fantastic!
pause
cls
goto :end
:no
echo Too bad...
pause
cls
goto :end
:end
cls
cd: ..\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...