Thread: Hookscript
View Single Post
01-05-22, 04:50 AM   #1
glupikreten
A Theradrim Guardian
Join Date: Apr 2009
Posts: 60
Hookscript

Hi,

quick 2 questions:

1. how can you remove hookscript from frame upon some condition?
2. what is the best way to wait for some frame to show in UI... and i dont mean to Show() when already exists.. i mean to get it when it is created regardless of its visibility state?

i want this:

Code:
UIParent:HookScript(
	"OnUpdate",
	function(self)

		if CUSTOMFRAME then
			CUSTOMFRAME:HookScript(
				"OnUpdate",
				function(self)
					print("have it")
				end
			)
			

                      UNHOOK UIPARENT BECAUSE I FOUND FRAME
		end
	end
)

Thank you.
  Reply With Quote