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 / Shell execution... Music doesn`t play

Author
Message
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 1st Aug 2008 15:31
Hey guys!

I made 2 exes with Dark Basic.

The first one, "Start_Music.exe" will execute the file "music.exe", and will then pass info to it once both are running.

The second one is the one being executed, "music.exe", and it`s perpose is to play music by reading the passed information from the clipboard.



The problem I am having, is that when I switch to the window "Start_music" by clicking on it, the one that doesn`t have a spinning cube on it, the music in the other window will stop playing until you click on that window, but the cube is still spinning.

How can I get the music to play even though the window is in the background?

The attached file contains the 2 exes, and the music. To start it, double click "Start_music.exe". This may take up to 30 seconds to prepare itself, and the desktop may turn black, but that is normal.

Suicide is away of telling God, You can’t fire me I quit !!!!!

Attachments

Login to view attachments
Pixelator
17
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 2nd Aug 2008 23:19
show code pleese, i might know whats happening but to be sure i need to see code

Bluestar4
19
Years of Service
User Offline
Joined: 19th Dec 2005
Location: USA
Posted: 4th Aug 2008 10:52
hey comet, the great bluestar greets you - why are you using two exe's to do this ? just incase you wish to continue pursuing this, take a second look at the exec commmand , you will find that there is an additional no-wait parameter that you can use, in one case the current exe will wait until the second exe is completely done(meaning the first executeable doesn't do anything until the second one is finished) but changing this variable to a no-wait status will result in both exe's running at the same time.

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 4th Aug 2008 19:14 Edited at: 4th Aug 2008 19:17
@Bluestar4

Welcome back! I haven`t heard from you for a long time(has it been a year?)

If I wan`t both exes to run at the same time, I just use



right? That`s what I did, and they do both run at the same time, but once the music window is in the background, the cube still rotates, but the music dims away...

Suicide is away of telling God, You can’t fire me I quit !!!!!
Bluestar4
19
Years of Service
User Offline
Joined: 19th Dec 2005
Location: USA
Posted: 5th Aug 2008 00:10
hey comet, actually your using the first of two options which is :

the syntax for the command your looking for is :

as you can see it takes 4 paramters in place of 3. You can set the wait flag to 0 or 1. setting to no-wait means the second file will execute in the background while the first window remains active, setting to wait means that the first file will wait until the second file has completely exited. so you could use :

Its been a long time since I expermented with this so can remember which one does what but I think this should help you accomplish what your after.
ya its been about 5 months but I've been busy with other projects so haven't had much time to spend in the forums lately but I believe I have time now to do a couple more db projects.

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 5th Aug 2008 09:34
If you set it to 0, both will run, and if you leave it out(
), both will run. But the music still doesn`t play...

Suicide is away of telling God, You can’t fire me I quit !!!!!
Bluestar4
19
Years of Service
User Offline
Joined: 19th Dec 2005
Location: USA
Posted: 5th Aug 2008 09:55
oh so the problem isnt about executing its about the music playing -my bad, I should have read the post more carefully. I suggest that in this case that you simply pass a command line string to the second exe using the CL$() function :



TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 5th Aug 2008 18:13
Quote: "oh so the problem isnt about executing its about the music playing -my bad, I should have read the post more carefully. I suggest that in this case that you simply pass a command line string to the second exe using the CL$() function :
"


Almost, Bluestart, almost. I see your learning fast!

Maybe I didn`t explain properly...

It already does execute the file, and it also plays the music, by passing info with the clipboard (if I press s, it stops, if p, it plays), and the music does run, but only while the window with the music playing is in the foreground...

That is my problem, how to make the music play, even when the window is behind another one.

Suicide is away of telling God, You can’t fire me I quit !!!!!
Pixelator
17
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 5th Aug 2008 18:23
comet, im pretty darn sure that bluestar was right the first time. try it at least.

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 7th Aug 2008 18:01
OK, sorry I sounded rude

Suicide is away of telling God, You can’t fire me I quit !!!!!
Bluestar4
19
Years of Service
User Offline
Joined: 19th Dec 2005
Location: USA
Posted: 9th Aug 2008 16:49
np I'm glad to help if I can and if my solution doesnt' work then there are plenty of others that I can offer.

Pixelator
17
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 19th Aug 2008 22:47
Quote: "I'm glad to help if I can and if my solution doesnt' work then there are plenty of others that I can offer."


im 2 steps ahead of you. nearly all of my solutions don't work

Your signature has been erased by a mod
Bluestar4
19
Years of Service
User Offline
Joined: 19th Dec 2005
Location: USA
Posted: 21st Aug 2008 19:32
lol well we all slide down the perverbial dungeon stairs once in a while.

Login to post a reply

Server time is: 2025-06-07 06:50:41
Your offset time is: 2025-06-07 06:50:41