Shoutbox

Context menu - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Context menu (/showthread.php?tid=84047)

Context menu by sergio on 05-31-2008 at 07:46 PM

Hi all.
Can you explain me how to add  context menu for contact list? Or add menu item in existing one?


RE: Context menu by CookieRevised on 06-01-2008 at 12:04 AM

Depending on your programming skills (but since you ask how to make a context menu I assume you don't have the right skills (yet)) the answer is one of these:

- In order for your script to react on a context menu click it needs to subclass the window. And with pure Plus! scripting you can not subclass the contact list window. So adding a context menu item is useless since you wont be able to do anything with it anyways....


- There are 'tricks' to subclass the contact list window, but those involve the use of external libraries. On this scripting forum you can find such a library which you could use. But beware that this is not as easy as is sounds, even making sure that the library is always properly loaded can be very tricky. And to know how to add a context menu item I woul refer to the MSN library (or billions of example codes on the net)... But as I said, since you ask how to make a context menu item, I very much doubt you would have the skills to make a proper subclassing (which is absolutely needed for this to work).


-------------------------

PS: What exactly do you want to do in such a way that you can't use the contact list scripting menu?

If it is to add a menu item which does something in general (eg: opening the event viewer, starting a subroutine in your script, etc), then you better use the existing Plus! scripting menu in the contact list.

If it is to add a menu item which does something specific for the selected contact in the contact list, then that is totally impossible to do. Even if you manage to subclass the contactlist window, Messenger will not return the email or name of the currently selected contact.