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. Contact Name
Hi,

I was searching for a code that show's me the nickname of your contact person, I want to make a script like:
[/code]
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind)
{
// if my contact has the same name as me, then: {
var Message = + HERE THE CONTACT NAME CODE + "Has the same name " ;
Message = MsgPlus.RemoveFormatCodes(Message);
MsgPlus.DisplayToast("Name check", Message);
  }
//} else { do nothing }
[/code]

But I'm missing some codes, could anyone help me with these codes? (look at the commands)

Thanks :D
08-04-2006 10:07 PM
Profile E-Mail PM Web Find Quote Report
alexp2_ad
Scripting Contest Winner
****

Avatar
Who love the chocolate?

Posts: 691
Reputation: 26
37 / Male / –
Joined: May 2004
Status: Away
RE: Contact Name
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind){
    if(Origin == Messenger.MyName){
        var ToastMessage = Origin + "Has the same name " ;
        ToastMessage = MsgPlus.RemoveFormatCodes(ToastMessage);
        MsgPlus.DisplayToast("Name check", ToastMessage);
    }
}

08-04-2006 10:10 PM
Profile E-Mail PM Find Quote Report
Suma
New Member
*


Posts: 7
33 / Male / –
Joined: Aug 2006
O.P. RE: Contact Name
yes, i know the Origin code... but that don't work on my new script... is ther no other code who get only the name of your contact?
08-04-2006 10:29 PM
Profile E-Mail PM Web Find Quote Report
cloudhunter
Senior Member
****


Posts: 536
Reputation: 18
37 / – / –
Joined: Dec 2005
RE: Contact Name
Why doesn't it work on your new script? Post it here and lets look to see if we can fix it.

The origin code is the only code for getting a name from your recieved message.

Cloudy
[Image: cloudy.jpg]
Sig by pirateok/marisaok/marisa ;)
quote:
Originally posted by Moulin Rouge
The greatest thing you'll ever learn, is just to love and be loved in return

6910 days, 2 hours, 9 minutes, 11 seconds ago
08-05-2006 12:59 AM
Profile E-Mail PM Find Quote Report
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 »


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