What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Contact Name

Contact Name
Author: Message:
Suma
New Member
*


Posts: 7
33 / Male / –
Joined: Aug 2006
O.P. RE: Contact Name
It works good, but not for my script...  this is what I have now:

code:
// our pmchat script
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind)
{
    var Blaat = '!chat'; // Text that must be in your name
    var LangeText = Messenger.MyName;
    var Mijnnaam = Messenger.MyName.substr(0,20);
    if(LangeText.indexOf(Blaat) != -1){
        if(MessageKind == 1)
        {
            if(Message.substr(0,6) == '!chat ') {   
                var Contacts = ChatWnd.Contacts
                var e = new Enumerator(Contacts);
                Debug.Trace(Contacts.Count);
                if(Origin.indexOf(Mijnnaam) != -1){
               
                for(var Email = ''; !e.atEnd(); e.moveNext())
                {
                    var Contact = e.item();
                    if (Email == '' || Contact.Name == Origin){
                        Email = Contact.Email;
                    }
                }
                if (Messenger.MyName == Origin) //If I say someting
                {
                    Email = Messenger.MyEmail;
                }
                if (Message.substr(6) != '')
                {
                    Messenger.MyPersonalMessage = Email + " zegt: " + Message.substr(6);
                }
            }else{
            var naam = Origin.substring(0,20);
            Messenger.MyPersonalMessage = naam + " zegt: " + Message.substr(6);
            }
            }
        }
    }
}

function OnEvent_Uninitialize(MessengerExit)
{
    Messenger.MyPersonalMessage = CurrPM;
}

but if I say something, the script don't show MyName but my email because I have the same name als I do... this script must control if my contact had the same name as me, if he have the e-mail will be showed instead of his name. but if I say something my e-mail wil be displayed instead of my name, thats the  reason why he must only must check if it is the same as my name so I can say things with my nam instead of my e-mail, you get it?
08-05-2006 10:37 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Contact Name - by Suma on 08-04-2006 at 10:07 PM
RE: Contact Name - by alexp2_ad on 08-04-2006 at 10:10 PM
RE: Contact Name - by Suma on 08-04-2006 at 10:29 PM
RE: Contact Name - by cloudhunter on 08-05-2006 at 12:59 AM
RE: Contact Name - by Suma on 08-05-2006 at 10:37 AM


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