frame:HookScript("OnShow",function(self)-- Do somethingend); frame:HookScript("OnHide",function(self)-- Do somethingend);