alatedseraph Posted September 22, 2004 Share Posted September 22, 2004 ok no one will answer me on my earlier post so ill make a new one... how do i add music so that it plays over and over again without interfering with the other parts of the program? Link to comment Share on other sites More sharing options...
alatedseraph Posted September 22, 2004 Author Share Posted September 22, 2004 and is it possible to bind the music with the exe so that the ppl wont have to download 2 different things? Link to comment Share on other sites More sharing options...
emmanuel Posted September 22, 2004 Share Posted September 22, 2004 (edited) and is it possible to bind the music with the exe so that the ppl wont have to download 2 different things? <{POST_SNAPBACK}>SoundPlay() FileInstall() Edited September 22, 2004 by emmanuel "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
alatedseraph Posted September 22, 2004 Author Share Posted September 22, 2004 well i know about soundplay i want to make it so that the music is looped so that it replays over and over Link to comment Share on other sites More sharing options...
emmanuel Posted September 22, 2004 Share Posted September 22, 2004 well i know about soundplay i want to make it so that the music is looped so that it replays over and over <{POST_SNAPBACK}>make a adlib that uses timer* funcs to restart the sound after it's done playing? "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
Guest BL@(K-R34P3R Posted September 22, 2004 Share Posted September 22, 2004 Loop the soundplay? Link to comment Share on other sites More sharing options...
alatedseraph Posted September 22, 2004 Author Share Posted September 22, 2004 its all well and good that u guys tell me wat i could do but i still dont know HOW to do it lol ive only been doing this for 2 days... Link to comment Share on other sites More sharing options...
Guest BL@(K-R34P3R Posted September 22, 2004 Share Posted September 22, 2004 I'm not saying this to be mean or anythiing, but people around here really don't like it unless you attempt it yourself first. Open up the helpfile, and look for the SoundPlay() function, and for the loops. For While, etc... Link to comment Share on other sites More sharing options...
alatedseraph Posted September 23, 2004 Author Share Posted September 23, 2004 hey black not to be rude but did u even find out if i tried or not? yes ive tried alot and larry wat i want is i have a series of questions and answer things and i want the jeopardy music that i have to play over and over while they do the program i have made Link to comment Share on other sites More sharing options...
Guest BL@(K-R34P3R Posted September 23, 2004 Share Posted September 23, 2004 $music = 1 If $music = 1 Then SoundPlay("Fileextentionhere.wav or .mp3 or whatever") EndIf Link to comment Share on other sites More sharing options...
Christopher Blue Posted September 23, 2004 Share Posted September 23, 2004 alatedseraph, I have an idea of how to accomplish what you want by using the Run and WinClose functions but I have to do a little more research before I can post some test code (I just started this last night =D). Link to comment Share on other sites More sharing options...
Christopher Blue Posted September 23, 2004 Share Posted September 23, 2004 Wow, that is a much more elegant solution than I was thinking of. Great coding Larry! Link to comment Share on other sites More sharing options...
emmanuel Posted September 23, 2004 Share Posted September 23, 2004 oh nevermind.... this wouldn't do what you want, not beyond two loops, then it'd keep restarting the music. Larry, you rock. $timer = TimerInit() $length = 3 * 1000 * 60;assuming the song is exactly 3 minutes long SoundPlay("jeapardy.mp3") AdlibEnable("musicloop") ;script asking questions AdlibDisable() func musicloop() if TimerDiff($timer) > $length SoundPlay("jeapardy.mp3") EndIf EndFunc "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
the_lord_mephy Posted September 23, 2004 Share Posted September 23, 2004 If $CMDLINE[0] = 1 And $CMDLINE[1] == "/jeopardy" Then Jeopardize() can u explain what that does plz? My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote] Link to comment Share on other sites More sharing options...
emmanuel Posted September 23, 2004 Share Posted September 23, 2004 If $CMDLINE[0] = 1 And $CMDLINE[1] == "/jeopardy" Then Jeopardize() can u explain what that does plz? <{POST_SNAPBACK}>well, it does something differently if you have those values set... how would those values be set you ask? check this out, under command line parameters "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
alatedseraph Posted September 23, 2004 Author Share Posted September 23, 2004 ok well larry i tried wat u put but its not working right... later tonite ill send u the script cause im at school right now but the song is a .mid its located at c:\jeopardy.mid as of right now i have it so that after each question it starts the music until u press ok then it goes to the second question thing and restarts the music again so its like waiting music it plays until u are finished with doing the calculations... wat i want it to do is play the entire time not having to restart after everyone... Link to comment Share on other sites More sharing options...
alatedseraph Posted September 23, 2004 Author Share Posted September 23, 2004 Link to comment Share on other sites More sharing options...
emmanuel Posted September 23, 2004 Share Posted September 23, 2004 (edited) here is kinda how it goes... needs to be compiled...If $CMDLINE[0] = 1 And $CMDLINE[1] == "/jeopardy" Then Jeopardize() ;regular script goes here... ; ;Run Jeopardy music like... Run('"' & @SCRIPTFULLPATH & '" /jeopardy') WinWait("Jeopardy Music") ; ;ask questions here... ; ;kill music WinClose("Jeopardy Music") Func Jeopardize() AutoItWinSetTitle("Jeopardy Music") While 1 SoundPlay("jeopardy.mp3",1) Sleep(1000) Wend EndFunc <{POST_SNAPBACK}>ok here is my code... the games pretty pathetic but im limited on my imagination lolĀ anyway here <{POST_SNAPBACK}>I believe that what Larry had meant was for you to put all of your questions in the area where ";ask questions here..." is. The music is handled by the app running itself a second time, in the background. ps, you missed the closing [/ code] tag and that's why your post is malformed. pps, that is the way Jeopardy works though, isn't it? they only play the music at the beginining of a question Edited September 23, 2004 by emmanuel "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
Matt @ MPCS Posted September 23, 2004 Share Posted September 23, 2004 Script suggestion: Put your questions in an external text file and read them in as you go. This will shorten your code and make your script more maintainable. *** Matt @ MPCS Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now