What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » noob in need of some help

noob in need of some help
Author: Message:
Gareth_2007
Junior Member
**


Posts: 21
Joined: Mar 2007
O.P. noob in need of some help
hey

im looking for some code help im sending a messege to a contact using
code:
Wnd.SendMessage(Msgs['Welcome']);
that would show

Gareth.... says:
Welcome to the test program.
this is just some random text

this is what i would like it to look like with out changing my display name:

Test Program:
Welcome (contacts username)

the away status with messenger plus sort of does what i would like to do.


and how could i get the first 7 letters of the contacts display name and show it where it says contacts username above? cheers

This post was edited on 10-25-2007 at 01:15 AM by Gareth_2007.
10-25-2007 01:10 AM
Profile E-Mail PM Find Quote Report
bigbob85
Full Member
***

Avatar
Is Good, Is Bob...

Posts: 128
Reputation: 4
36 / Male / Flag
Joined: Jul 2003
RE: noob in need of some help
If you be patient I can write this up for you in about 12 hours, if no one helps you before then.

You have to get the contacts name (making sure there is only 1 contact in the current window), and that will be a string. Then use the substring (or substr ?) method to cut it down.
10-26-2007 01:41 AM
Profile E-Mail PM Web Find Quote Report
Gareth_2007
Junior Member
**


Posts: 21
Joined: Mar 2007
O.P. RE: noob in need of some help
if you could write it that would be great :D cheers gareth
10-26-2007 02:20 PM
Profile E-Mail PM Find Quote Report
bigbob85
Full Member
***

Avatar
Is Good, Is Bob...

Posts: 128
Reputation: 4
36 / Male / Flag
Joined: Jul 2003
RE: noob in need of some help
code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
    var Contacts = ChatWnd.Contacts;
    var e = new Enumerator(Contacts);
    for(; !e.atEnd(); e.moveNext())
    {
        var Contact = e.item();
        Debug.Trace(" " + Contact.Name.substring(0, 20));
    }
}

You should be able to adapt that into something useful.
Contact.Name - Name of the contact in the chat.
substring(start, end) - cuts down the string from start, till end.

Might also want to check Contacts.count to see if its 1 (only 1 contact in a the chat window).

Hope that helps.
10-27-2007 04:18 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