What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » How to start off a plugin and how to make it simply change your name

Pages: (2): « First [ 1 ] 2 » Last »
How to start off a plugin and how to make it simply change your name
Author: Message:
jasonallen
Full Member
***

Avatar
www.jason-allen.co.uk

Posts: 127
Reputation: 2
36 / Male / –
Joined: Jul 2003
O.P. How to start off a plugin and how to make it simply change your name
How do I simply create a plugin that changes your name? Using VB6. I have the API files.
Windows XP Professional
Windows Live Messenger 14.0.8050.1202
Messenger Plus! Live 4.79.0.342
04-15-2005 04:36 PM
Profile PM Web Find Quote Report
TheGeek
Full Member
***

Avatar
Excuse my geekyness.

Posts: 179
Reputation: 15
34 / Male / –
Joined: Feb 2005
RE: How to start off a plugin and how to make it simply change your name
With the SetNewName function.
[Image: 468x60banner.png]
04-15-2005 04:39 PM
Profile E-Mail PM Web Find Quote Report
jasonallen
Full Member
***

Avatar
www.jason-allen.co.uk

Posts: 127
Reputation: 2
36 / Male / –
Joined: Jul 2003
O.P. RE: How to start off a plugin and how to make it simply change your name
I don't understand all the initialise stuff
Windows XP Professional
Windows Live Messenger 14.0.8050.1202
Messenger Plus! Live 4.79.0.342
04-15-2005 04:40 PM
Profile PM Web Find Quote Report
TheGeek
Full Member
***

Avatar
Excuse my geekyness.

Posts: 179
Reputation: 15
34 / Male / –
Joined: Feb 2005
RE: How to start off a plugin and how to make it simply change your name
Well, I can't really tell you how to do that because I'm not a plugin programmer. I just knew the SetNewName function because its included with the Scripting host plugin.

Offtopic: i wish there was a way to get the text said by a contact with the scripting host. :( :P
[Image: 468x60banner.png]
04-15-2005 04:42 PM
Profile E-Mail PM Web Find Quote Report
Stigmata
Veteran Member
*****



Posts: 3520
Reputation: 45
21 / Other / Flag
Joined: Jul 2003
RE: How to start off a plugin and how to make it simply change your name
code:
Public Function ChangeNick(nick As String)
'functions changenick
'originally code by effekt
'altered to work better and with msn7 by stormsys

Dim msnmsblclass As Long 'Main MSN Window Variable
Dim edit As Long 'Edit Text Box Variable
Dim x As Long 'Options Window Variable

msnmsblclass& = FindWindow("MSBLWindowClass", vbNullString) 'Get Messenger Window HWND
DoEvents 'w8 for api to compleate what its dooing
PostMessage msnmsblclass&, WM_COMMAND, 40268, 0 'Show Options Box
DoEvents 'w8 for api to compleate what its dooing
x& = FindWindow("#32770", "Options") 'Get Options Box HWND
DoEvents 'w8 for api to compleate what its dooing
x& = FindWindowEx(x&, 0&, "#32770", vbNullString) 'Get Options Box HWND
DoEvents 'w8 for api to compleate what its dooing
edit& = FindWindowEx(x&, 0&, "edit", vbNullString) 'Get Edit Box HWND
DoEvents 'w8 for api to compleate what its dooing
SendMessageByString edit&, WM_SETTEXT, 0, nick 'Set Edit Box Text
DoEvents 'w8 for api to compleate what its dooing
PostMessage edit&, WM_KEYDOWN, VK_RETURN, 0 'Push Enter
'no there is absolutly no need for this 2nd enter
End Function


http://forums.msnfanatic.com/index.php?showtopic=11504
04-15-2005 04:42 PM
Profile PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: How to start off a plugin and how to make it simply change your name
'This is just an example of using the Visual Basic Input Box on the Initialize Function to set the new name.

Public strNewUserName As String
Public blnNameChange As Boolean

Public Function Initialize(ByVal nVersion As Long, ByVal sUserEmail As String, ByVal oMessenger As Object) As Boolean
    Initialize = True
    strNewUserName = InputBox("Enter New Name","Enter New Name", "Enter New Name")

    If strNewUserName = "" Or strNewUserName = "Enter New Name" Then
        MsgBox "Please Select A Different Name"
    Else
        blnNameChange = SetNewName(strNewUserName)
    End If
End Function



'If you are confused abuot what each of the variables passed through initialize are then please read the following.

'//////////////////////////////////////////////////////////////////////
'//
'// Purpose: Initialization function
'//
'// Definition:
'//   This function is called when Messenger starts and each time a
'//   different user signs-in in Messenger.                         
'//                                                                 
'// Parameters:                                                     
'//   * nVersion: plugin support version. This will be used in the   
'//     future to identify different levels of support. Messenger   
'//     Plus! 3.20 sets this value to 5.                             
'//   * sUserEmail: email of the current user in Messenger. If       
'//     Messenger is not signed-in, this parameter is the email of   
'//     the last user who signed in. Messenger Plus! uses this value
'//     to load its own settings.                                   
'//   * oMessenger: Messenger COM interface. The type of this object
'//     is "Messenger". For more information, consult the public     
'//     Messenger API documentation on Microsoft's web site.         
'//   * return value: if your initialization is successfull, return 
'//     True to notify Messenger Plus! that the plugin is ready to   
'//     use.                                                         
'//                                                                 
'// Plugin Version Index:                                           
'//     Messenger Plus! 2.20: 1                                     
'//     Messenger Plus! 2.21: 2                                     
'//     Messenger Plus! 2.50: 3                                     
'//     Messenger Plus! 3.00: 4                                     
'//     Messenger Plus! 3.20: 5                                     
'//                                                                 
'//////////////////////////////////////////////////////////////////////




'The above documentation is located in MPPluginDef.cls

This post was edited on 04-15-2005 at 05:14 PM by matty.
04-15-2005 05:07 PM
Profile E-Mail PM Find Quote Report
jasonallen
Full Member
***

Avatar
www.jason-allen.co.uk

Posts: 127
Reputation: 2
36 / Male / –
Joined: Jul 2003
O.P. RE: How to start off a plugin and how to make it simply change your name
What wd be an example to put in for version and omessenger?
Windows XP Professional
Windows Live Messenger 14.0.8050.1202
Messenger Plus! Live 4.79.0.342
04-15-2005 05:12 PM
Profile PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: RE: How to start off a plugin and how to make it simply change your name
quote:
Originally posted by j.g.allen
What wd be an example to put in for version and omessenger?

'This is just an example for calling the oMessenger object passed through the Initialize Function into a Variable.
'Make sure to set a reference to the MessengerAPI Type Library


Public WithEvents MessengerAPI As MessengerAPI.Messenger

Public Function Initialize(ByVal nVersion As Long, ByVal sUserEmail As String, ByVal oMessenger As Object) As Boolean
    Initialize = True
    Set MessengerAPI = oMessenger
End Function

'Setting a new nickname through the oMessenger Object passed through the Initalize Function is impossible as the MyFriendlyName Property is Read-Only (Cannot be changed). This is why I had Patchou add the SetNewName function into the API.

'The code that Stigmata posted is using Windows API calls but the Contact List Window has to be opened for it to work.

This post was edited on 04-15-2005 at 05:18 PM by matty.
04-15-2005 05:17 PM
Profile E-Mail PM Find Quote Report
jasonallen
Full Member
***

Avatar
www.jason-allen.co.uk

Posts: 127
Reputation: 2
36 / Male / –
Joined: Jul 2003
O.P. RE: How to start off a plugin and how to make it simply change your name
What does it mean for when i says:
"No creatable public componented detected"?
Windows XP Professional
Windows Live Messenger 14.0.8050.1202
Messenger Plus! Live 4.79.0.342
04-15-2005 05:27 PM
Profile PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: How to start off a plugin and how to make it simply change your name
quote:
Originally posted by j.g.allen
What does it mean for when i says:
"No creatable public componented detected"?
Ok you need to make sure that in the Properties of your Class Module is set to MultiUse.
04-15-2005 05:29 PM
Profile E-Mail PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« 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