/run dX = OmenAnchor:IsVisible() local f = ChatFrame3; local min_x = 245 min_y = 125 max_x = 365 max_y = 125 if dX then f:SetWidth(min_x); f:SetHeight(min_y); dX = nil; else f:SetWidth(max_x); dX = true; f:SetHeight(max_y); end
This is the code that I use to toggle omen and resize my chat box to fit omen inside my kgpanels. Recently I switched to sThreatmeter and I'd like to have another macro to resize my chat panel. I'm not sure it could toggle SThreat since I don't think sThreat has a toggle option yet.
Unless sThreatMeter forcibly shows itself, you could just :Hide() it and check if it's visible the same way you toggle Omen's visibility and check if it's visible. I don't use sThreatMeter though, so I couldn't tell you what the frame name is. The convenience of in-game configuration in Omen is worth a few extra kb of memory IMO. :D
It shows itself in party combat. I've got two macros made, one to enlarge the chat frame and one to shrink it. That's probably just fine for me since there doesn't seem to be a way I can toggle sThreatmeter on and off.