Jump to content

Recommended Posts

Posted (edited)

SoundPlay ("C:\blah\blah.mid")
   $LTJB = MsgBox (4, "Blah", "Blah" )
   If $LTJB = 7 Then
      Exit
   EndIf

;Script then continoues

The above scripts plays a sound file and pops a msg box up, if u Click No or close the msgbox the sound will stop playing because autoit3 isnt running anymore, but if u click yes the sound will continue to play

Is there a way i can stop the sound without closing the msg box or clicking "no"? i want it to be able to stop when "yes" is pressed

Edited by burrup

qq

Posted

the only way to stop a file from playing is terminating the script. are you wanting to carry on with the script while the sound is going? or just stop the sound to start another?

Posted

SoundPlay ("entertanr.mid")
   $LTJB = MsgBox (4, "Blah", "Blah" )
   If $LTJB = 7 Then
SoundPlay ("null")
   EndIf
sleep(10000)
;Script then continoues

instead of exit i just executed soundplay again on a file that doesn't exist. it stops the sound right now. then i added the delay to see if it truly ended and yeah it did.

Posted

ahhh very good... ty. I think they should include that in the help file :)

<{POST_SNAPBACK}>

Ahh nice, i needed it too... yeah somethings missing in the helpfile about this func..

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...