What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » How to respond to a text...

How to respond to a text...
Author: Message:
nekkro-kvlt
New Member
*


Posts: 7
Joined: Sep 2005
O.P. How to respond to a text...
Hello, i would like to make a pager plugin, and i want to get the event when the user type !page...
I tried that

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
    'This sample responds to a !ping request sent by /xpingvb
    If (StrComp(sNotifyCode, "page", vbTextCompare) = 0) Then
       MsgBox "test " & sText
        Exit Function
    End If
   
    'Give other plugins a chance to receive this notification
    ReceiveNotify = False
End Function

but it doesn't work !
Help would be very appreciated ;)

Thanks
09-19-2005 12:44 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: How to respond to a text...
Have you read what RecieveNotify does?

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.                        //
'//                                                                  //
'//////////////////////////////////////////////////////////////////////

Read that and let me know if you have any questions.
09-19-2005 01:19 PM
Profile E-Mail PM Find Quote Report
J-Thread
Full Member
***

Avatar

Posts: 467
Reputation: 8
– / Male / –
Joined: Jul 2004
RE: How to respond to a text...
I think the answer is already given...
quote:
this 5 character

"test" doesn't really seem to be 5 characters...;)
09-19-2005 01:53 PM
Profile E-Mail PM Find Quote Report
nekkro-kvlt
New Member
*


Posts: 7
Joined: Sep 2005
O.P. RE: How to respond to a text...
Is there a way to respond to a text that doesn't begin by nCCNotify? Because i want to make a local pager, like an automessage who say, type !page your message... or the notify character isn't easy to use for the contact.
I don't know if you'll understand me... i just want my plugin to be called when you receive a message which start by '!page'

Thanks for your answers !
09-19-2005 04:01 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: How to respond to a text...
If you use ActiveAccessibility you can access the convos but using the Messenger Plus! API you don't have access to the conversation other then that from RecieveNotify and the History object in the Messenger API.


Matty's reply to Active Accessibility for incoming messages

quote:
Originally posted by J-Thread
No...not with the standard msg plus! plugin options..

You'de have to hook into msn to do that, and that's a difficult thing:)

Isn't this what I said?

This post was edited on 09-19-2005 at 04:32 PM by matty.
09-19-2005 04:21 PM
Profile E-Mail PM Find Quote Report
J-Thread
Full Member
***

Avatar

Posts: 467
Reputation: 8
– / Male / –
Joined: Jul 2004
RE: How to respond to a text...
No...not with the standard msg plus! plugin options..

You'de have to hook into msn to do that, and that's a difficult thing:)
09-19-2005 04:22 PM
Profile E-Mail PM Find Quote Report
nekkro-kvlt
New Member
*


Posts: 7
Joined: Sep 2005
O.P. RE: How to respond to a text...
ok, thanks for your answers!
09-19-2005 05:50 PM
Profile E-Mail 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