What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Solved [Help] Can't get contacts from enumerator.

Solved [Help] Can't get contacts from enumerator.
Author: Message:
Deco
Full Member
***


Posts: 188
Reputation: 4
42 / Male / Flag
Joined: Aug 2006
O.P. Solved [Help] Can't get contacts from enumerator.
Hi guys

I'm trying to get contacts from a chatWnd using the Messenger.CurrentChats enumerator... but for some reason it doesn't work. If someone could take a look and maybe help here's the code.

code:
function SendsMyMessageToSomeone(Email,Message) {
    var Windows = Messenger.CurrentChats;
    var e = new Enumerator(Windows);
    for(; !e.atEnd(); e.moveNext()) {
        var myContacts = e.Contacts;
        var f = new Enumerator(myContacts);
        for(; !f.atEnd(); f.moveNext())    {
            var myContact = f.item();
            if(myContact.Email == Email)    {
                e.SendMessage(Message);
                }   
            }
          }
      }


This is the error I get:

Error: Object not a collection.
       Line: 26. Code: -2146827837.

Line 26 is: var f = new Enumerator(myContacts);


Thanks

edit: Solved by Plan. Thanks a lot.


This post was edited on 10-31-2006 at 10:04 AM by Deco.
10-31-2006 02:35 AM
Profile E-Mail PM Web Find Quote Report
Plan-1130
Full Member
***

I keep askin' myself: why?

Posts: 142
73 / Male / –
Joined: Feb 2005
RE: [Help] Can't get contacts from enumerator.
at line 25:
code:
var myContacts = e.item().Contacts;
that should fix it :)

This post was edited on 10-31-2006 at 06:12 AM by Plan-1130.
My Scripts: UltimatFlooder, Advanced PSM Chat, PlusPrivacy, PlusRemote

[Image: Plan-1130.png]
10-31-2006 06:11 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On