Contact PSM change - 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: Contact PSM change (/showthread.php?tid=86927) Contact PSM change by ArkaneArkade on 10-28-2008 at 06:28 AM
Hey folks, RE: Contact PSM change by SmokingCookie on 10-28-2008 at 03:32 PM
code: Call LoadContacts() somewhere in the very beginning of your script, recommend OnEvent_SigninReady(); If a change occurs in your contact list, Messenger Plus! will update the Contacts array, as well as Messenger.MyContacts and ChatWnd.Contacts. A PSM change --> should <-- call OnEvent_ContactPsmChange() (unless you change your own psm). An extra safety option for ContactSignin would be: code: Also, if OnEvent_ContactPsmChange() occurs, the Contacts array (by which I mean our array declared in the global scope at the top, not MsgPlus' Contact(s) object) is updated. RE: Contact PSM change by ArkaneArkade on 10-28-2008 at 06:29 PM
Cheers SmokingCookie, I'd completely forgotten how to do enumerators. Need to stop leaving scripting for so long. I've got work unfortunately, but after I'm back I'll give it a try and sort everything out. RE: Contact PSM change by Matti on 10-28-2008 at 06:35 PM
Why do you need to collect all Contact objects first, when you can do: code:Try not to make things more complicated than necessary. Plus! Live scripting is already hard enough! RE: Contact PSM change by SmokingCookie on 10-28-2008 at 06:37 PM
You can use enumerators using the for() loop, as I'd described in my previous post. There may be alternatives, like a while() loop, but this one's what I got used to and prefer to use. RE: Contact PSM change by matty on 10-28-2008 at 06:42 PM
quote:Which will fail if a new contact is added they will not be in the list. If at all possible use GetContact. RE: Contact PSM change by ArkaneArkade on 10-28-2008 at 10:32 PM
I have it working with the GetContact now. The enumerator worked fine, but I will only need it for a single contact, so the array just gets wasted. RE: Contact PSM change by Spunky on 10-29-2008 at 04:46 PM
quote: I have a feeling that the messages you'll need to look for will be formatted differently or used in a slightly different context (thus why Plus! doesn't seem to get them from WLM properly... it's like a new field rather than the psm (similar to how MediaPSM isn't the same as PSM, but they occupy the same space.) RE: RE: Contact PSM change by ArkaneArkade on 10-29-2008 at 07:01 PM I have a feeling that the messages you'll need to look for will be formatted differently or used in a slightly different context (thus why Plus! doesn't seem to get them from WLM properly... it's like a new field rather than the psm (similar to how MediaPSM isn't the same as PSM, but they occupy the same space.) I have it working... or did, it randomly stopped now. It is formatted slightly differently, and I think thats whats stopping Plus! detecting it, but it is still a PSM as far as I can tell, efter looking at Xniffs data for xbox and normal accounts. I just don't understand why I was successfully getting the PSM from it yesterday, but not today. Although I've just remembered what it was actually doing to give me it, so I'll do some testing. |