|  How to start off a plugin and how to make it simply change your name | 
| Author: | 
Message: | 
jasonallen 
Full Member 
   
  
  
www.jason-allen.co.uk
  
Posts: 127 Reputation: 2 
37 /   / – 
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 | 
 | 
  | 
TheGeek 
Full Member 
   
  
  
Excuse my geekyness.
  
Posts: 179 Reputation: 15 
35 /   / – 
Joined: Feb 2005 
 | 
| 
 RE: How to start off a plugin and how to make it simply change your name
 With the SetNewName function. 
 |   
 | 
| 04-15-2005 04:39 PM | 
 | 
  | 
jasonallen 
Full Member 
   
  
  
www.jason-allen.co.uk
  
Posts: 127 Reputation: 2 
37 /   / – 
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 | 
 | 
  | 
TheGeek 
Full Member 
   
  
  
Excuse my geekyness.
  
Posts: 179 Reputation: 15 
35 /   / – 
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.      
 |   
 | 
| 04-15-2005 04:42 PM | 
 | 
  | 
Stigmata 
Veteran Member 
     
  
  
Posts: 3517 Reputation: 45 
22 /   /   
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 | 
 | 
  | 
matty 
Scripting Guru 
     
  
 
Posts: 8327 Reputation: 109 
40 /   /   
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 | 
 | 
  | 
jasonallen 
Full Member 
   
  
  
www.jason-allen.co.uk
  
Posts: 127 Reputation: 2 
37 /   / – 
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 | 
 | 
  | 
matty 
Scripting Guru 
     
  
 
Posts: 8327 Reputation: 109 
40 /   /   
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 | 
 | 
  | 
jasonallen 
Full Member 
   
  
  
www.jason-allen.co.uk
  
Posts: 127 Reputation: 2 
37 /   / – 
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 | 
 | 
  | 
matty 
Scripting Guru 
     
  
 
Posts: 8327 Reputation: 109 
40 /   /   
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 | 
 | 
  | 
| 
Pages: (2): 
« First
  
 [ 1 ]
 2
 
»
 
Last »
 | 
| 
 |