You will have to go through the code for each frame to get the exact functions, and with some (like target or pet) do some checks before actually showing it, i.e. PlayerFrame:SetScript('OnEvent', PlayerFrame_OnEvent) When hidding the frame you can make the OnEvent function point to nil so no function gets called:Īnd then restore the original function when you want to show the frame again: Most Blizzard's frames (if not all) use a single function to handle all events, which makes it easier for us. To avoid this you need to prevent the frame from getting these events or from executing the code that makes the frame show. NOTE: Most frames have event handlers so even if you hide it, it can pop back up as a result of an event handler calling it's Show function.
If you use this in a Macro (not in an Addon), you have to add a /script-tag before: To hide a frame, you have to enter the frame name, followed by the command :Hide()