Quantcast WoWInterface - View Single Post - [Request] Macro to toggle sound
View Single Post
07-01-11, 06:59 PM   #10
A Pyroguard Emberseer
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,732
Originally Posted by Ketho View Post
Why did blizzard change the old functionality?
I think the old functionality was much more useful
GetCVar() has always acted this way. Blizzard later created GetCVarBool() that returns CVars stored as "0" and "1" as a boolean.

Originally Posted by litesung View Post
So there's no way to turn it into a toggle? It has to be done with two different macros?
See my post above:
Originally Posted by SDPhantom View Post
There are Lua functions provided in the default UI that are run by the keybind system for toggling music and sound... To do this in a macro, you make calls to Sound_ToggleMusic() and/or Sound_ToggleSound(). Both are defined in Sound.lua within the FrameXML.

Toggle Music:
/run Sound_ToggleMusic();
Toggle Sound:
/run Sound_ToggleSound();
Note: These are two different commands, you can put them together in a single macro if you wish.
/run Sound_ToggleMusic();
/run Sound_ToggleSound();
or more efficiently...
/run Sound_ToggleMusic();Sound_ToggleSound();
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 07-01-11 at 07:04 PM.
  Reply With Quote