I have a computer that i store all my old dos games on. I would like to
write a program in qbasic that allows me to show all the games so i can
pick one. I know how to write this program but i cant figure how to get
it to run the certain game...can i do this or atleast make it goto the
directory where the game is? please help.
Need serious help
- Michael Calkins
- Veteran
- Posts: 76
- Joined: Tue Apr 05, 2005 8:40 pm
- Location: Floresville, Texas
- Contact:
To change directory:
CHDIR
or
SHELL "CD\"+dirname$
To run a small game:
SHELL doscommand$
To run a large game, here is how I would do it:
Use a BAT file to run your QBASIC program. Something like this:
@echo off
:loop
if exist temp.bat del temp.bat
c:\dos\qbasic.exe /run myprog.bas
if exist temp.bat call temp.bat
if exist temp.bat goto loop
Then, have your QBASIC program write temp.bat with the command to execute your game. The advantage to this is that QBASIC.EXE is not still taking up memory.
Regards,
Michael
CHDIR
or
SHELL "CD\"+dirname$
To run a small game:
SHELL doscommand$
To run a large game, here is how I would do it:
Use a BAT file to run your QBASIC program. Something like this:
@echo off
:loop
if exist temp.bat del temp.bat
c:\dos\qbasic.exe /run myprog.bas
if exist temp.bat call temp.bat
if exist temp.bat goto loop
Then, have your QBASIC program write temp.bat with the command to execute your game. The advantage to this is that QBASIC.EXE is not still taking up memory.
Regards,
Michael
Bring on the Maulotaurs! oops...
I like to slay Disciples of D'Sparil...
I like to slay Disciples of D'Sparil...