Looking for a replacement command, please help

Many expansions ago I used this command to clear errors from the screen in macros

/run UIErrorsFrame:Clear()

Is there an updated version of this?

Thanks

Copying this from another thread in this forum
/run UIErrorsFrame:Hide() C_Timer.After(0, function() UIErrorsFrame:Clear() UIErrorsFrame:Show() end)

And here’s a macro where it’s used in wowpedia
https://wowpedia.fandom.com/wiki/Useful_macros

#showtooltip Fishing
/equipset Fishing
/console Sound_EnableErrorSpeech "0"
/use Darkmoon Fishing Cap
/run UIErrorsFrame:Hide() C_Timer.After(0, function() UIErrorsFrame:Clear() UIErrorsFrame:Show() end)
/console Sound_EnableErrorSpeech "1"
/use Fishing

It essentially delays calling the clear errors by a fraction and for some this will clear the errors at the right time

It works, and thank you … but if anyone knows of a way to do this with fewer characters I would appreciate it

Because it looks like something that will be used repeated by a keen fisherperson, I would paste the following into the website addon.bool.no to create/download a small small addon to take care of the UIError part.

function TLClr()
	UIErrorsFrame:Hide() 
	C_Timer.After(0, function() 
		UIErrorsFrame:Clear() 
		UIErrorsFrame:Show()
	end)
end

Then your macro would be:

#showtooltip Fishing
/equipset Fishing
/console Sound_EnableErrorSpeech "0"
/use Darkmoon Fishing Cap
/run TLClr()
/console Sound_EnableErrorSpeech "1"
/use Fishing

You could always /run the function code manually in-game before using the macro but…?

You could then use TLClr() in any macros /run where clearing the error frame is required.

1 Like