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 / open a .exe file hellp me plees

Author
Message
Stig Design Stig Magne
19
Years of Service
User Offline
Joined: 23rd Mar 2006
Location: Norway
Posted: 24th Jun 2008 21:09
hi i have started on creating a emulator like program in dbc but then i alsoe whatn to open/execute a .exe file that is a game or a programm but i have tried the codes in dbc and i havent get it to work so i enny one know how to do that plees tell me and alsoe if you know how to do that and to chekk if that game/Programm in .exe has a wariabel at start then it will execute the rest of the game/Programm but if nott it gives a error code and it goes back to the main programm

Stig Design (Free Games,Sources,Textures,Photo`s)
Lisence Free at http://StigDesign.piczo.com
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 24th Jun 2008 22:30
I believe the command you want is EXECUTE FILE command. Not exactly sure about that second part.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Stig Design Stig Magne
19
Years of Service
User Offline
Joined: 23rd Mar 2006
Location: Norway
Posted: 24th Jun 2008 22:37
yes it is that code but i havent gotten that that code to work correct

Stig Design (Free Games,Sources,Textures,Photo`s)
Lisence Free at http://StigDesign.piczo.com
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 24th Jun 2008 22:42
do you have any code or more information? because all I can do from this is give you the syntax, which I am sure you have

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Stig Design Stig Magne
19
Years of Service
User Offline
Joined: 23rd Mar 2006
Location: Norway
Posted: 24th Jun 2008 22:48
the code i have tried to youse this one (Execut filename,Comandline,directory,wait flag) i have tried this code menny times and in difrent ways but nothing has worked

Stig Design (Free Games,Sources,Textures,Photo`s)
Lisence Free at http://StigDesign.piczo.com
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 24th Jun 2008 23:55
thats the syntax, but you said nothing worked. What did you try? Does the file exist? did you type it wrong? did you forget the last e in execute (j/k just making a point)?

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Stig Design Stig Magne
19
Years of Service
User Offline
Joined: 23rd Mar 2006
Location: Norway
Posted: 25th Jun 2008 01:12
sorry i typed the code right the file and that but when it tries to open the .exe file it gives me a error i wright a code now so that it will be easy to under stand i am uploading it as .zip file

Stig Design (Free Games,Sources,Textures,Photo`s)
Lisence Free at http://StigDesign.piczo.com
Stig Design Stig Magne
19
Years of Service
User Offline
Joined: 23rd Mar 2006
Location: Norway
Posted: 25th Jun 2008 01:22
here is my file to start on

Stig Design (Free Games,Sources,Textures,Photo`s)
Lisence Free at http://StigDesign.piczo.com

Attachments

Login to view attachments
master programmer
20
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 25th Jun 2008 02:10
Ok well here is the code you should use:

EXECUTE FILE "Test.exe", "", "./", 1

"Text.exe" is the file that is being opened. The next argument that I left as "" is strings that are passed to the file being opened. I just left none. The next is the path to the file, in which I just put "./" to symbolize it's in the same directory. The next is the termination flag, which can be 0 or 1. 0 means that the program will launch regardless of if the file is already executed, 1 means the program will wait for the file to be executed before continuing/closing.

Stig Design Stig Magne
19
Years of Service
User Offline
Joined: 23rd Mar 2006
Location: Norway
Posted: 25th Jun 2008 02:11
ok thank you so mutch i will try that i this work i will putt you on my credit list

Stig Design (Free Games,Sources,Textures,Photo`s)
Lisence Free at http://StigDesign.piczo.com
Stig Design Stig Magne
19
Years of Service
User Offline
Joined: 23rd Mar 2006
Location: Norway
Posted: 25th Jun 2008 02:13
it give`s me a err or that is (System Error: Error 163 failed to set cooperative level for DirectDraw

Stig Design (Free Games,Sources,Textures,Photo`s)
Lisence Free at http://StigDesign.piczo.com
Ed222
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: Calgary
Posted: 25th Jun 2008 04:33
thats because you can't launch 2 dbc programs at once if you want you can put a end right after using the execute file command to make it work

Stig Design Stig Magne
19
Years of Service
User Offline
Joined: 23rd Mar 2006
Location: Norway
Posted: 25th Jun 2008 04:39
i tried to change the wait flag to 0 mbut it didn`t help

Stig Design (Free Games,Sources,Textures,Photo`s)
Lisence Free at http://StigDesign.piczo.com
Ed222
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: Calgary
Posted: 25th Jun 2008 04:41 Edited at: 25th Jun 2008 04:41
Quote: "i tried to change the wait flag to 0 mbut it didn`t help"

like I said before it's because you can't have 2 programs made by dbc running at once

Stig Design Stig Magne
19
Years of Service
User Offline
Joined: 23rd Mar 2006
Location: Norway
Posted: 25th Jun 2008 04:42
ok so how do i make this work
end the first programm and execute the second programm how do i do that plees help me

Stig Design (Free Games,Sources,Textures,Photo`s)
Lisence Free at http://StigDesign.piczo.com
Ed222
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: Calgary
Posted: 25th Jun 2008 04:47 Edited at: 25th Jun 2008 04:48
an example


Stig Design Stig Magne
19
Years of Service
User Offline
Joined: 23rd Mar 2006
Location: Norway
Posted: 25th Jun 2008 04:53
nop i did nott work for me it show`s a Black screen and i pressed F12 then i goes back to the editor and sudently it show the .exe file that i whanted to execute

Stig Design (Free Games,Sources,Textures,Photo`s)
Lisence Free at http://StigDesign.piczo.com
Ed222
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: Calgary
Posted: 25th Jun 2008 04:57 Edited at: 25th Jun 2008 04:58
that's how the dbc editor works if you builded the program you just ran then run it without using the editor it should work fine

Stig Design Stig Magne
19
Years of Service
User Offline
Joined: 23rd Mar 2006
Location: Norway
Posted: 25th Jun 2008 05:01
yes it i have tesded it now it worked the screen flikered but it worked so it worked thank you so mutch
hmmmm
how can i now make this chekk if the .exe file has at start a variabel like (test$)

Stig Design (Free Games,Sources,Textures,Photo`s)
Lisence Free at http://StigDesign.piczo.com
Stig Design Stig Magne
19
Years of Service
User Offline
Joined: 23rd Mar 2006
Location: Norway
Posted: 25th Jun 2008 05:02
what is your nic name at nett/Web so i can add you on my credit list

Stig Design (Free Games,Sources,Textures,Photo`s)
Lisence Free at http://StigDesign.piczo.com
Ed222
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: Calgary
Posted: 25th Jun 2008 05:16 Edited at: 25th Jun 2008 05:17
if your talking about in the program then use something like open to write and open to read to do that as for the credit you don't have to add me but if you want just put me down as my username

Stig Design Stig Magne
19
Years of Service
User Offline
Joined: 23rd Mar 2006
Location: Norway
Posted: 25th Jun 2008 05:17
ok thank`s

Stig Design (Free Games,Sources,Textures,Photo`s)
Lisence Free at http://StigDesign.piczo.com
master programmer
20
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 25th Jun 2008 08:19
What works better? Putting the 0 or 1 as the flag when using the end command after execute file?

Stig Design Stig Magne
19
Years of Service
User Offline
Joined: 23rd Mar 2006
Location: Norway
Posted: 25th Jun 2008 21:24
it`s quite nice code to open .exe file it makes ahole more option`s on programming if the pearson is good it might be yoused to open emulator prog`s and music files like a mediasenter or emulkator collection

Stig Design (Free Games,Sources,Textures,Photo`s)
Lisence Free at http://StigDesign.piczo.com
fnybny
17
Years of Service
User Offline
Joined: 15th Jun 2007
Location: calgary
Posted: 29th Jun 2008 05:17
i cant read your writing

hi
Stig Design Stig Magne
19
Years of Service
User Offline
Joined: 23rd Mar 2006
Location: Norway
Posted: 6th Jul 2008 21:27
the execute .exe file is a nice programming code it makes dbc more profesional programming language

Stig Design (Free Games,Sources,Textures,Photo`s)
Lisence Free at http://StigDesign.piczo.com

Login to post a reply

Server time is: 2025-06-05 23:52:53
Your offset time is: 2025-06-05 23:52:53