Toggle audio mute

Here's a jscript code for a button which toggles the audio mute/unmute:

function OnClick(clickData)
{
	var oShell = new ActiveXObject("WScript.Shell");
	oShell.SendKeys(String.fromCharCode(173));
}

It works by sending the multimedia button event (it's as if you've pressed the MUTE button on your keyboard, and this works even if you don't have a physical MUTE button on your keyboard).

You can also set up a global keymap in Opus which runs this code (without the OnClick part) and it will then work globally even if Opus is closed (as long as the Opus tray icon is there).

Have fun!

See also: Power & Volume control buttons

3 Likes