daslick Posted October 10, 2006 Share Posted October 10, 2006 (edited) I made a test proggy to play beep songs (using the system speaker)... but when I start a song the only way to stop it is to end the program. How can I stop the song's function? expandcollapse popupGuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $muteunmute _stop() Case $msg = $next if $song = "" then _mario() if $song = "mario" then _clockscoldplay() if $song = "clockscoldplay" then _mario() Case $msg = $previous if $song = "" then _clockscoldplay() if $song = "mario" then _mario() if $song = "clockscoldplay" then _clockscoldplay() Case Else ; EndSelect WEnd ;songs Func _mario() $song = "mario" do _56(162) _56(162) _R(54) _56(162) _R(54) Until 1 EndFunc Func _clockscoldplay() $song = "clockscoldplay" $count = 1 Do _67(200) _62(200) _59(200) _R(10) $count = $count + 1 Until not $song not = "clockscoldplay" or $count = 8 EndFunc Func _stop() $song = "" EndFunc Let me know if you need more info or something. Thanks EDIT:shortened the songs to save space on page Edited October 10, 2006 by daslick Link to comment Share on other sites More sharing options...
erebus Posted October 10, 2006 Share Posted October 10, 2006 Have a look here:http://www.autoitscript.com/forum/index.php?showtopic=25201 Link to comment Share on other sites More sharing options...
daslick Posted October 10, 2006 Author Share Posted October 10, 2006 Ok thanks for the link. Does anyone know how to make it beep until you release the key in stead of beep over and over until you release the key. I want to make a musical keyboard proggy . 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