Page 1 of 1

Window Hook

Posted: Tue May 04, 2004 11:56 pm
by Skye
Looking for a piece of information on the startup sequence of events/hooks.

BACKGROUND
I spiraled into debugging a previously working script today - going out of my mind - a very simple macro was breaking: ${Window[blahblah]} was always returning NULL.

OBSERVATION
After some black-box debugging (I was just looking for the "Adding WndNotification target '%s'" message being sent to my log file), it seems to me that the MQ2Windows.cpp:SetScreenHook.SetScreen_Detour is only called if MQ2 is started before EQ. Voila, the macro would respond again once I started them in the right sequence.

Is this true?

Posted: Wed May 05, 2004 12:07 am
by dont_know_at_all
No. MQ2 hooks the functions but they are not called from EQ if UI is already initialized. /loadskin or restart will fix your problems.

Posted: Wed May 05, 2004 12:57 am
by Skye
Thank you for the quick response, DKAA. I could tell that the hooks were being called only at initialization ... since I have never used different skins, using /loadskin never occurred to me! I do appreciate the pointer.

Posted: Wed May 05, 2004 1:22 am
by Lax
yes what is happening is, MQ2 hooks the initialization of the windows. If it doesnt catch the initializations, it doesnt know what windows are open. Currently we dont have a way around that, but one might pop up soon.