Jump to content

SoundPlay ( "filename" [, wait] )


Recommended Posts

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

Link to post
Share on other sites

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.

Link to post
Share on other sites

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...