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 / loading exe

Author
Message
crow34
19
Years of Service
User Offline
Joined: 22nd Jul 2005
Location:
Posted: 24th Aug 2005 01:15
how do i load a second exe from within my dbprogram?

any ideas help appreciated

tried this code but can not get it to work?
Xolatron old
20
Years of Service
User Offline
Joined: 25th Jan 2004
Location: The Star Forge Language: DBpro
Posted: 24th Aug 2005 02:29
Yes, 'execute file' is the right command. Sometimes it doesn't work for me though, don't know why. The wait flag of 1 seems to help, though (you have this already).

However, you need a space in this line (fixed below):


But don't try running a DBpro program from DBpro... poor CPU

-Xol


DBpro IonRay IDE: Demo 0.1.0.0 available!
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 24th Aug 2005 04:54
Using the "Execute File" command, you can also pass on information, like scores or the player's name as a string.

CaMeRoN H
19
Years of Service
User Offline
Joined: 21st Aug 2005
Location: Who knows?
Posted: 24th Aug 2005 06:00
Yeah wont work for me either

master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 24th Aug 2005 10:25 Edited at: 24th Aug 2005 10:28
I believe you can not just use plain text to tell what exe/file to open. For example I've tried using execute file "my.exe","nothing","C:/windows/desktop/",1. (Changing the "nothing" to whatever I need, however). I've found the best way to do this is to do the following with the help of strings:

That code will open the file "my.exe", the command just doesn't do anything (if you don't want anything to carry over), path$ is the obvious path or directory to the file, and "1" is the termination flag, which, will terminate the currently open file (the one that executed the exe file). [Which, can be excluded]

I don't know if that is a DB glitch or not, it just doesn't work without the strings on my computer.

ALSO! Make sure that the .exe has already been created, and, that is has all of the files it needs (unless it is a final draft). NOTE: DB sometimes has problems when executing an existing exe directly from the compiler

SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 27th Aug 2005 11:14 Edited at: 27th Aug 2005 11:16
I'd be surprised if the example above worked at all...

aren't slashes to a local path supposed to be the other type?

\ instead of /

...also, I've never encountered problems with the execute file command in DBC whether the strings have been pre-determined inserted straight into the line

...maybe one day I'll finish a project
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 28th Aug 2005 01:43
/ and \ are the same - they work the same.

Tinkergirl
21
Years of Service
User Offline
Joined: 1st Jul 2003
Location: United Kingdom
Posted: 28th Aug 2005 05:43
I don't know how it is for that Db command, but / and \ are not the same. Many's the time I've crashed because I got a / and a \ mixed up - many programmers have laughed at me behind my back.
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 28th Aug 2005 06:02
I take it you program with DBpro, eh Tinkergirl?

Tinkergirl
21
Years of Service
User Offline
Joined: 1st Jul 2003
Location: United Kingdom
Posted: 28th Aug 2005 07:25
I was actually thinking more of when I'm at work - and I don't program there at all. But I'm surrounded by programmers - really nice guys, and if they do laugh, they at least do it discretly

Again, I haven't used that command myself, so I don't have direct experience with it.
SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 28th Aug 2005 09:09 Edited at: 28th Aug 2005 09:11
Quote: "
(Originally posted by master programmer)
/ and \ are the same - they work the same.
"




I really didn't think they were the same...

\ is used for all microsoft OS local paths
/ is used for either paths within compressed folders, or linux and internet paths (websites are usually hosted on linux servers)

...maybe one day I'll finish a project
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 28th Aug 2005 09:09 Edited at: 28th Aug 2005 09:12
Oh, well, in some DOS prompts you have to use "" instead of "/", but in DB you can use either one. Tinkergirl, what languages do you program in? (Or do you do object modeling or something?)
Simsmall: You beat me to it! I meant in DB they were the same. I ran into the same thing (/ and \) when I was using DOS, come to think of it I have one of those machines around here somewhere....

Login to post a reply

Server time is: 2024-11-27 18:34:43
Your offset time is: 2024-11-27 18:34:43