Sound Trigger

Posted by Evo42 on Sun 03 Dec 2017 08:19 PM — 3 posts, 15,537 views.

#0
The objective here is to avoid using the built in sound button. It's nice and it works, but I'm trying to just make the trigger itself run with a sound function.

Such as Sound ("test.wav")

The trigger I'm using is simply "East" and the SendTo (set as script) is Sound ("test.wav")

Any time this is done, regardless of where the sound file is, it just plays the general alert that windows comes with. Is there a specific place that MUSHclient is looking up sounds from? The objective is that any user that is given these triggers can be given the same sound files for their own personal use. Without the need of having them in the same directory, if possible.

Me, I'm a loon. I keep my MUSHclient folder on my desktop, just as an example. The sound I'm trying to use is in the sound folder for this, however.

This is MUSHClient 4.84 that I am using currently.
Amended on Sun 03 Dec 2017 08:52 PM by Evo42
Australia Forum Administrator #1
Check the return code from the Sound function.

eg.


check (Sound ("test.wav") )


You might get a code indicating the sound file isn't in a supported format. You can use Audacity (or ffmpeg) to change codecs.

Template:function=Sound
Sound

The documentation for the Sound script function is available online. It is also in the MUSHclient help file.



Also check out the PlaySound function.

Template:function=PlaySound
PlaySound

The documentation for the PlaySound script function is available online. It is also in the MUSHclient help file.

#2
Huh. I was able to do PlaySound, I just had to remove the parenthesis from either end. That solves that problem. Hehe.

Thanks!