RE: Global Window-handler possible?
OnWindowEvent_CtrlClicked is for Plus! windows that you have created using MsgPlus.CreateWnd.
You'll have to get the handle for the chat window and use a windows DLL to detect when a control is clicked in a chat window however. (May I ask why you need this anyway?).
Furthermore, you have REALLY complicated things with chat windows. You can itterate through them using Messenger.CurrentChats which will save on memmory and be easier for everyone to understand (and more straightforward for yourelf as well).
You can also get the handle of a window with a contact that is currently open already by using Messenger.OpenChat.
I highly recomend that you look at other scripts. I find your code unnecessarily complicated. I guess you have a programming background, but it really isn't nicely presented. Because there are many people who make a script and never come back, it would be nice if you keep it nice and simple so that we can take a look at the code later and help people when they have problems.
I hope this helps, and if you have further questions about the scripting engine then don't be afraid to ask.
|