What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » SetNewName() but remember?!

SetNewName() but remember?!
Author: Message:
liamcrayden
New Member
*


Posts: 2
Joined: May 2006
O.P. SetNewName() but remember?!
I would like to be able to use the SetNewName() function to change a contacts display name, but would like to be able to change it back to the original name at a later point.

Is there any way to 'remember' the display name of the contact before it gets changed? i.e store it in a variable somewhere for later use. Another issue would be whether the contact had multi-formatting in their name and how this could be handled.

I'm new to this but willing to learn. Thanks in advance.
05-11-2006 09:50 AM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: SetNewName() but remember?!
You can't change a contacts display name. Only contacts can change their own name...

SetNewName() is meant to set your nick name, not your contact's.

-------

If you mean their "custom name" then there isn't a function/method to catch that.

Well there is, as "custom names" are stored in the registry, but it would require to calculate the contact hash to be able to retrieve it from the registry as contact emails are encrypted:
HKCU\Software\Patchou\MsgPlus2\<your_.NET_passport>\Contacts\<encrypted_contact's_.NET_Passport>\CustomName

In theory you could set the custom name in the same way, but then you would need also a way to update the display in the contact list.

This post was edited on 05-11-2006 at 11:26 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
05-11-2006 11:25 AM
Profile PM Find Quote Report
J-Thread
Full Member
***

Avatar

Posts: 467
Reputation: 8
– / Male / –
Joined: Jul 2004
RE: SetNewName() but remember?!
I think he means the name of the user that is using his plugin, not of one of his contacts.

You should first get the Nickname, and I don't remember if that is easy to do, but I think it should. Well somebody else can probably answer that...
05-11-2006 01:48 PM
Profile E-Mail PM Find Quote Report
Mnjul
forum super mod
******

Avatar
plz wub me

Posts: 5396
Reputation: 58
– / Other / Flag
Joined: Nov 2002
Status: Away
RE: SetNewName() but remember?!
It's easy once you use Messenger API and retrieve the interface correctly in your Initialize() function (the iMessengerObj parameter, suppose you use C++) :)
05-11-2006 02:57 PM
Profile PM Web Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: SetNewName() but remember?!
quote:
Originally posted by J-Thread
You should first get the Nickname, and I don't remember if that is easy to do
code:
BSTR oldName;
msnApi->get_MyFriendlyName(&oldName);
As you can see, it's really difficult :P

Edit: It's even harder in VB ;P
code:
Dim oldName As String
oldName = MSNAPI.MyFriendlyName

This post was edited on 05-11-2006 at 07:18 PM by RaceProUK.
[Image: spartaafk.png]
05-11-2006 07:18 PM
Profile PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: SetNewName() but remember?!
quote:
Originally posted by J-Thread
I think he means the name of the user that is using his plugin, not of one of his contacts.
quote:
Originally posted by liamcrayden
(...) to change a contacts display name

---------------------

You can not change the name of a contact (retrieving is the easy part; setting it is impossible).

Hence my post about the "custom display name" as that is the only thing you could change regarding your contacts.

If it is your own name, not your contact's, then setting it is as easy as retrieving it (see Mnjul's and Raceprouk's post)

This post was edited on 05-12-2006 at 03:29 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
05-12-2006 03:27 AM
Profile 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