Shoutbox

when i receive a message what an event will spring in MessengerAPI ? - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Forum: Plug-Ins (/forumdisplay.php?fid=28)
+------ Thread: when i receive a message what an event will spring in MessengerAPI ? (/showthread.php?tid=60074)

when i receive a message what an event will spring in MessengerAPI ? by guojivip on 06-02-2006 at 03:02 PM

when i receive a message what an event will spring in MessengerAPI ?
Thanks~


Function ReceiveNotify ? Who can tell me this Function how to use for MSN Messeger7.5?
RE: when i receive a message what an event will spring in MessengerAPI ? by vikke on 06-03-2006 at 07:34 AM

There are no such events.


RE: when i receive a message what an event will spring in MessengerAPI ? by guojivip on 06-03-2006 at 10:08 AM

To vikke:
yes I see ,but the "Function ReceiveNotify" in the example for  "Messenger Plus! Plugin API for VB.NET" is true

who can tell me how to use this Function~?Thanks
Code:
    '//////////////////////////////////////////////////////////////////////
    '//                                                                  //
    '// Purpose: Allow special actions when a plugin text is received    //
    '//                                                                  //
    '// Definition:                                                      //
    '//   This function is called everytime Messenger Plus! detects a    //
    '//   plugin text ID in a message received from a user. This ID is   //
    '//   generally placed at the beginning of a text by a plugin        //
    '//   command to perform an action on the destination computers.     //
    '//   This can be used, for example, to play a sound. See the        //
    '//   control characters section for more information.               //
    '//                                                                  //
    '// Parameters:                                                      //
    '//   * sNotifyCode: this 5 character string is the notify code that //
    '//     was sent next to the plugin ID control character. Use it to  //
    '//     identify what action to perform.                             //
    '//   * sText: the rest of the received message. You can use it to   //
    '//     get more information about the action you want to perform.   //
    '//     However, you MUST NOT use this parameter to determine if an  //
    '//     action is supported by your plugin. Use sNotifyCode instead. //
    '//   * sContactName: friendly name of the contact who sent this     //
    '//     text.                                                        //
    '//   * oConversationWnd: Messenger Conversation Window COM          //
    '//     interface. The type of this object is                        //
    '//     "MessengerConversationWnd". For more information, consult    //
    '//     the public Messenger API documentation on Microsoft's web    //
    '//     site.                                                        //
    '//   * sTextToSend: this parameter is optional. You can use it if   //
    '//     you want to ask Messenger Plus! to send a new message after  //
    '//     this one has been displayed. This WON'T modify the message   //
    '//     associated with the notify code, this will simply send a new //
    '//     one.                                                         //
    '//   * return value: if you recognized the notify code return True, //
    '//     else, return False.                                          //
    '//                                                                  //
    '// Advanced: if the plugin version returned by Initialize() is 2 or //
    '// above, you can specify more than one message or command in       //
    '// sTextToSend. Simply create new lines with # as first character   //
    '// (use vbLf to create new lines in your string). Up to 20 actions  //
    '// can be specified, each being executed at a 0.5 second interval.  //
    '// A different delay can even be entered for each action. After the //
    '// first #, just put a digit between 1 and 9 and another #.         //
    '//   Example: sTextToSend = "#First message\n#5#Second message"     //
    '//                                                                  //
    '// Important: keep in mind that several plugins can be installed    //
    '// and that a lot of text is received. If you don't support the     //
    '// notify code passed in parameter, you must return as fast as      //
    '// possible and without doing anything else.                        //
    '//                                                                  //
    '//////////////////////////////////////////////////////////////////////
    Public Function ReceiveNotify(ByVal sNotifyCode As String, ByVal sText As String, ByVal sContactName As String, ByVal oConversationWnd As Object, ByRef sTextToSend As String) As Boolean
    End Function


RE: when i receive a message what an event will spring in MessengerAPI ? by matty on 06-03-2006 at 01:44 PM

The RecieveNotify function provided by the Messenger Plus! API doesn't capture messages send/recieved. This function is used to allow two of the same plugins (one on each computer) to react a specific way to a command send that requires the contact to respond. Take the /ping command for example. You can do this using RecieveNotify. Messenger Plus! will see the character to specificy its for RecieveNotify then it will check against 5 specific characters to verify the plugin is supposed to respond.

If you wait for Messenger Plus! Live it has OnEvent_ChatWndReceiveMessage which is trigered when a message is sent/recieved.

Alternatly you can use ActiveAccessibility : Matty's reply to Active Accessibility for incoming messages.


RE: when i receive a message what an event will spring in MessengerAPI ? by vikke on 06-03-2006 at 03:39 PM

Sorry! I thought you were talking about the messenger api. MSAA is the best way.