Thread Tools Display Modes
04-11-15, 03:48 PM   #1
Jynks
A Frostmaul Preserver
Join Date: Oct 2006
Posts: 264
Macro Command to remove error text and sound?

Hey there.. can anyone remember the text for removing the error text as well as the sound "i can't cast that that" type stuff you can put in a macro?
  Reply With Quote
04-11-15, 10:30 PM   #2
Petrah
A Pyroguard Emberseer
 
Petrah's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2008
Posts: 2,988
Is that something different than the option in System/Sound "Error Speech"?
__________________
♪~ ( ) I My Sonos!
AddOn Authors: If your addon spams the chat box with "Addon v8.3.4.5.3 now loaded!", please add an option to disable it!
  Reply With Quote
04-12-15, 12:30 AM   #3
karmamuscle
A Cobalt Mageweaver
 
karmamuscle's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 205
Is this what you're looking for?

Code:
/run sfx=GetCVar("Sound_EnableSFX");
/console Sound_EnableSFX 0
/cast Spell
/run UIErrorsFrame:Clear() 
/run SetCVar("Sound_EnableSFX",sfx);
__________________
55 89 144 233 377 610 987 1597 2584 4181 6765
  Reply With Quote
04-12-15, 02:55 AM   #4
Jynks
A Frostmaul Preserver
Join Date: Oct 2006
Posts: 264
thanks guys!
  Reply With Quote
04-14-15, 03:10 PM   #5
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,308
I've known this for a while and find it funny that Blizzard never actually finished registering these commands.

ChatFrame.lua:2320
Code:
-- easier method to turn on/off errors for macros
SlashCmdList["UI_ERRORS_OFF"] = function(msg)
	UIErrorsFrame:UnregisterEvent("UI_ERROR_MESSAGE");
	SetCVar("Sound_EnableSFX", "0");
end

SlashCmdList["UI_ERRORS_ON"] = function(msg)
	UIErrorsFrame:RegisterEvent("UI_ERROR_MESSAGE");
	SetCVar("Sound_EnableSFX", "1");
end
__________________
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
04-14-15, 06:58 PM   #6
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Ugh, registering/unregistering the event is the awful way to do it.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
04-15-15, 03:12 AM   #7
Petrah
A Pyroguard Emberseer
 
Petrah's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2008
Posts: 2,988
I agree with Seerah. Disable the sound for error text from within the games system settings. An addon that allows you to choose which error texts you wish to remove may be a better option for you.


http://www.curse.com/addons/wow/errorfilter

(It is hosted here, but not updated... so I linked to the updated version on Curse)
__________________
♪~ ( ) I My Sonos!
AddOn Authors: If your addon spams the chat box with "Addon v8.3.4.5.3 now loaded!", please add an option to disable it!
  Reply With Quote
04-17-15, 02:22 PM   #8
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,308
Originally Posted by Seerah View Post
Ugh, registering/unregistering the event is the awful way to do it.
It is Blizzard code we're looking at. What else would you expect from them? I just think it's funny they didn't finish implementing it and left these functions orphaned in the command list.

In my custom dev addon, I completed their registration by linking them in the hash table with /erron and /erroff.
Code:
hash_SlashCmdList["/ERROFF"]=SlashCmdList.UI_ERRORS_OFF;
hash_SlashCmdList["/ERRON"]=SlashCmdList.UI_ERRORS_ON;


Note: Trying to register SLASH_<Tag># globals after FrameXML loads wouldn't work as they are processed into the hash file and the entries of SlashCmdList are moved into its metatable. The code I posted just provides the missing action of pushing pointers of the functions into the hash table and associating them with their slash commands. Also note the index needs to be uppercase as Blizzard code transforms typed commands to uppercase in order to perform case-insensitive lookups.
__________________
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 : 04-17-15 at 02:38 PM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Macro Help » Macro Command to remove error text and sound?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off