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.

DarkBASIC Discussion / command to run an EXE file?

Author
Message
That1Smart Guy
15
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 9th Nov 2009 03:38
i remember hearing about a command that could run an EXE file, but i forget what it was and i cant find it

does anyone know?

Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 9th Nov 2009 03:44
Execute File exeName$,CommanLine$,Path$

exeName$ is the name of the exe without the path

CommandLine$ is the Well command line lol

Path$ is the path minus the name lol. i am not exactly sure why they seperated the name and path like that.

so this:

Execute File "db.exe","-c c:\temp.dba","c:\program files\dark basic software\"

would run db.exe with the comand line -c which is compile. so it would compile the file temp.dba.

New Site! Check it out \/
That1Smart Guy
15
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 9th Nov 2009 04:44
thanks caleb, and may i say that you seem to have gained a lot of experience and knowledge since ive been away, keep at it!

Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 9th Nov 2009 05:29 Edited at: 9th Nov 2009 05:32
Anytime! Thanks a lot! I will don't worry haha


Edit:


Oh! i forgot! there is a extra parameter(optional of course) for whether or not you want db to wait until the exe is done before returning or if you want it to run in the background. it is specified by a 1 or a 0 for the last parameter.

New Site! Check it out \/
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 9th Nov 2009 16:51
Is this part of your multiple windows question?

After looking at PureGDK, which allows you to edit scripts and the effects are seen in real time I thought about how to do this in DBC. I reckon you could create a display exe that reads data from a db file you have in the editor. Like the CLI but your whole program in real-time.
Is that possible?

"With games, we create these elaborate worlds in our minds, and the computer is there to do the bookkeeping." - Will Wright
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 9th Nov 2009 17:02
It's possible but would probably be really slow. You'd have to parse the strings read in into useable commands to dbc.

You'd have something like a loop running in the exe that reads in the file and breaks the string of each line down into usable chunks. Basically, you'd be writing a parser and an interpreter.

Enjoy your day.
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 10th Nov 2009 01:39
Or a hole nother language :p

New Site! Check it out \/
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 13th Nov 2009 18:45
I guess if one made their own script language with short commands, then it might flow pretty well.
Quote: "I reckon you could create a display exe that reads data from a db file you have in the editor. Like the CLI but your whole program in real-time"

But trying to translate DBC source code inside a DB executable... too redundant.

Enjoy your day.
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 15th Nov 2009 22:46
I geuss it is possible, but any full sized game would run pretty slow after a while.

New Site! Check it out \/
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 24th Nov 2009 07:13
Quote: "But trying to translate DBC source code inside a DB executable... too redundant."

hmm yeah it's a bit like translating the english dictionary into spanish and then back to english.
Do you know how the CLI works? Seeing as dbc is interpreted is there some way to slip more lines in at run time?

"With games, we create these elaborate worlds in our minds, and the computer is there to do the bookkeeping." - Will Wright
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 24th Nov 2009 15:37 Edited at: 24th Nov 2009 15:38
I am guessing that when you input a command it is translated and executed right there, because it's not like it adds it to a queue or put's it in the source because 1 when you done it's not in your source and 2 it happens right when you hit enter. not when you exit the cli

New Site! Check it out \/
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 24th Nov 2009 22:46
Quote: "Do you know how the CLI works? Seeing as dbc is interpreted is there some way to slip more lines in at run time?"

In an exe, the CLI is locked. If you wanted to slip more lines in, you'd have to know how the lines are stored as byte code in the exe itself. You'd then have to make adjustments to the exe itself to accept your new lines in the proper place, with the proper codes, and you'd have to make sure the size of the exe accomodates as well.

Enjoy your day.

Login to post a reply

Server time is: 2024-04-26 19:26:27
Your offset time is: 2024-04-26 19:26:27