Quantcast WoWInterface - View Single Post - [Request] Macro to toggle sound
View Single Post
06-30-11, 08:31 PM   #6
A Pyroguard Emberseer
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,732
That's because the old GetCVar() function either returns a string or nil. There are Lua functions provided in the default UI that are run by the keybind system for toggling music and sound. Using the default keybindings, you can use Ctrl+M and Ctrl+S for music and sound respectively. 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();
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)
  Reply With Quote