Running external program

Shadowalker
09 Feb 2005, 20:12
I'm working on the startscript of a game right now, and I wanted that when it starts it plays a music file. The file is an mp3, so I can't run it in-game, but need to run it as an external file that opens with windows media player. However, I want that the focus should remain on the quest window when it opens, and you shouldn't see the windows media player opening. I saw there was some box to tick, I think it was "not active" or something like that, that was supposed to keep quest on top. It doesn't work. Is there some other way to make quest stay on top? Thanks

Anonymous
10 Feb 2005, 01:36
Eh, your problem might be solved easier by using the Shellexe command with a WMP command-line argument, or even better an older version of media player(MPLAYER2.exe). There is also a chance that when QDK might be messing up the code or something, because the following code worked for me with my media player of choice. You could modify your code using this snippet as necessary, and drop your mp3 into your quest directory. Would atleast let us know if it's qdk messing up.


command <play> {
shell <Mos Def - Mathematics.mp3; notactive>
}

Shadowalker
10 Feb 2005, 21:12
I used the same code that you posted, and it still keeps the focus on WMP. I changed the file so that it opens with Winamp, and tried it, and then the focus does remain on the quest window. I also tried it with a couple of other programs, and they all worked. WMP is the only one that stays on top of quest when it opens. Is that a bug or something? Also, ITID, what does "opening with a WMP command-line argument" mean? I'm not sure what that means; maybe that's why it didn't work.

007bond
11 Feb 2005, 08:44
Just more proof of M$ trying to dominate the "I've got the best programs" war.