Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Need help with .BAT execution

Author
Message
IzzY
20
Years of Service
User Offline
Joined: 13th Mar 2004
Location: ky
Posted: 20th May 2004 09:34
Hi everyone I use darkbasic mostly to write programs. Not much of a gamer but I use this everyday and i love it. Basicly my problems is this. I'm writing a program for an old dos zed editor. In the code DB creates a .BAT (dos) file to execute some dos functions. Then it's supposed to execute that BAT file creating a volume of zeds (static shapes) for old game Starsiege. Then it is supposed to delete the .BAT file leaving the new volume with shapes in it. it would work perfect but it keeps saying "This program is in use" when DB tries to execute the .bat. I think its becuase the .bat is still used by DB from the creation process. Anyway I would love some advice. Ive tried rerouting several differnet ways and nothing works. I used other .exe's to execute and created other .BAT files to execute the one i need to execute and nothing happens. Please Help.

The Wizard Of Iz
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 20th May 2004 09:43 Edited at: 20th May 2004 09:46
add

Close file file number

before you launch it.

~zen

[edit] Just saw that you included your source. I think this should work.



zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 20th May 2004 18:30
Also 3/10ths and 9/10ths of a millisecond sleep delay does nothing. Try sleep 300 and sleep 900 respectively.
--
TAZ

History did not begin with PONG. -- Greg Costikyan

Game Beavers
IzzY
20
Years of Service
User Offline
Joined: 13th Mar 2004
Location: ky
Posted: 21st May 2004 05:36
Your ROCK man. The Close file file number works pefect. Program is up and running fine now. . HEHE we just simplified one of the most aggravating programs in the world. "Zed Editor" I love darkbasic. I'm very addicted to making programs. Thanks guys.

The Wizard Of Iz
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 21st May 2004 07:09 Edited at: 21st May 2004 07:12
Izzy,

Thanks for posting back. It's always nice to know if things work out.
Happy coding!

zircher,
Good eye! I didn't even notice that. Good thing I don't work in quality control. Or with snakes!

~Zen

IzzY
20
Years of Service
User Offline
Joined: 13th Mar 2004
Location: ky
Posted: 24th May 2004 22:21
Your welcome guys i hope one day i can have the knowledge you guys have. I am finding some cool ways to do things like the .BAT creation I think that was pretty cool.

The Wizard Of Iz

Login to post a reply

Server time is: 2024-09-22 10:37:58
Your offset time is: 2024-09-22 10:37:58