How to stop the notification sound (when it is too long)

User Help for Mozilla Thunderbird
Post Reply
Barabba
Posts: 104
Joined: March 17th, 2015, 8:08 am

How to stop the notification sound (when it is too long)

Post by Barabba »

Hi, for environment reasons I need to play a long sound to advice an email is received (very important for me) so I can notice it even after minutes, when I'll be around PC again. But how can I stop it playing? I guess, a thunderbird activity should tell Thunderbird that notification should be over, no more necessary, but it still play till the endo of file. There is a way to stop it? Thank you
morat
Posts: 6438
Joined: February 3rd, 2009, 6:29 pm

Re: How to stop the notification sound (when it is too long)

Post by morat »

You could use the Mailbox Alert extension to run a system command that plays a sound in another application.

Mailbox Alert
http://addons.thunderbird.net/thunderbird/addon/2610
Barabba
Posts: 104
Joined: March 17th, 2015, 8:08 am

Re: How to stop the notification sound (when it is too long)

Post by Barabba »

Thank you, I gonna check it, I don't understand why when I changed the sound the first time I was able to "kill" the sound simply making some activities on thunderbird, for example opening the message. Now the sound is unstoppable, I need to close thunderbird, why?
morat
Posts: 6438
Joined: February 3rd, 2009, 6:29 pm

Re: How to stop the notification sound (when it is too long)

Post by morat »

I don't know how you stopped a sound, maybe the garbage collector stopped the sound because the application ran out of memory.

There is no API to stop a sound using the default sound interface.

Reference
http://developer.mozilla.org/docs/Mozil ... e/nsISound
http://searchfox.org/comm-central/searc ... _SOUND_URL

P.S.

You could use the Mailbox Alert extension to play a sound using the VLC media player, then use their controls to stop the sound.

VLC media player
http://www.videolan.org/vlc/
Barabba
Posts: 104
Joined: March 17th, 2015, 8:08 am

Re: How to stop the notification sound (when it is too long)

Post by Barabba »

thank you a lot, I've approached for the first time vbs scripting and I created this, it plays the sound in loop and display a simple dialod, any button will terminate music
Dim oPlayer
Set oPlayer = CreateObject("WMPlayer.OCX") ' Play audio
oPlayer.URL = "C:\1.wav"
oPlayer.controls.play
oPlayer.settings.setMode "loop", True

intAnswer = _
Msgbox("Press Yes or No to stop music", _
vbYesNo, "This is an allert")

While oPlayer.playState <> 1 ' 1 = Stopped

If intAnswer = vbYes Then
oPlayer.close

Else
oPlayer.close

End If

WScript.Sleep 100
Wend
Post Reply