What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » plugin help needed (ReceiveNotify)

plugin help needed (ReceiveNotify)
Author: Message:
npc
New Member
*


Posts: 5
Joined: Nov 2005
O.P. plugin help needed (ReceiveNotify)
hi,
i am a beginner programmer trying to write a plugin for msgplus in VB.NET which uses simple "/dropfile" and ActiveWinamp to send the currently playing item on winamp to anyone who types a trigger. similar to the built in  !triggers. it should work even if the user does not have plus installed.

the problem is that the plugin's ReceiveNotify method does not get called at all. i have changed the notify variable to ascii integer of "!" and tried other characters such as "X".
nothing happens when someone types "!sendf" (5char command).

i have tried all i can, but it seems it just doesn't work.
i have tested the "/dropfile" and winamp filepath retrieval methods to work properly. so the problem is about the plugin or msgplus not recognizing that a message received is a plugin command.

please help if you will. thanks in advance. forgive me if its a craptastic easy question.. i can't figure it out.

i am using msgplus 3.61.145 and msnmssngr 7.5 build 7.5.0331

This post was edited on 11-25-2005 at 01:12 PM by npc.
11-24-2005 04:37 PM
Profile PM Find Quote Report
J-Thread
Full Member
***

Avatar

Posts: 467
Reputation: 8
– / Male / –
Joined: Jul 2004
RE: plugin help needed (ReceiveNotify)
All plugin commands should begin with an x, so make it:

/xdropfile
11-25-2005 08:56 AM
Profile E-Mail PM Find Quote Report
npc
New Member
*


Posts: 5
Joined: Nov 2005
O.P. RE: plugin help needed (ReceiveNotify)
thanks, but the '/dropfile' i am referring to is built-in msgplus. i have tested that to work correctly.
the problem here is the ReceiveNotify method not being called at all even when the correct trigger is received.

This post was edited on 11-25-2005 at 10:52 AM by npc.
11-25-2005 10:45 AM
Profile PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: plugin help needed (ReceiveNotify)
ReceiveNotify is only called when the user receives a message that starts with sCCNotify. This usually means that the sender has to use a command from a plugin, so must have Plus! too.
[Image: spartaafk.png]
11-25-2005 12:45 PM
Profile PM Web Find Quote Report
npc
New Member
*


Posts: 5
Joined: Nov 2005
O.P. RE: plugin help needed (ReceiveNotify)
i have set sCCNotify to be ascii equivalent "!" and tried others such as &H12 etc. ReceiveNotify is still not called when someone sends a message starting with sCCNotify such as "!sendf". i put a msgbox method in the ReceiveNotify to see if it gets called at all, and it is not... any idea what the problem is?
11-25-2005 01:07 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: plugin help needed (ReceiveNotify)
quote:
Originally posted by npc
i have set sCCNotify to be ascii equivalent "!" and tried others such as &H12 etc. ReceiveNotify is still not called when someone sends a message starting with sCCNotify such as "!sendf". i put a msgbox method in the ReceiveNotify to see if it gets called at all, and it is not... any idea what the problem is?
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.                        //
'//                                                                  //
'//////////////////////////////////////////////////////////////////////


I am not sure but did you read the comments for receivenotify? The text has to be sent as a command so /xplugin and when you send the text it will be converted to actual text (something you specify) being proceeded with the nCCNotify and your 5 characters to specify for the plugin to respond to.

code:
'//////////////////////////////////////////////////////////////////////
'//                                                                  //
'// The Notify control character is for exclusive use by plugins. It //
'// is generally inserted by plugin commands. This code must be at   //
'// the beginning of a message, must be transformed to a string with //
'// Chr() and must be followed by a 5 characters notify code unique  //
'// to your plugin.                                                  //
'//                                                                  //
'// Example: "XsamplHello!" (where "X" is the 0x12 character)        //
'// When received, the user will only see "Hello!" and               //
'// ReceiveNotify() will be called with "sampl" in sNotifyCode.      //
'//                                                                  //
'//////////////////////////////////////////////////////////////////////

Public Const nCCNotify As Long = &H12


This post was edited on 11-25-2005 at 01:33 PM by matty.
11-25-2005 01:19 PM
Profile E-Mail PM Find Quote Report
npc
New Member
*


Posts: 5
Joined: Nov 2005
O.P. RE: plugin help needed (ReceiveNotify)
great! i got the idea. i was using different commands for sending and receiving.. thanks for the help. really appreciate it. should be fixed soon.
11-25-2005 01:34 PM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: plugin help needed (ReceiveNotify)
Or to put it in another way:

1) You do not change the nCCNotify constant. It must be specifically ascii code 0x12 because that is exactly what Plus! looks for in a message to trigger the ReceiveNotify  procedure.

2) Only when your contact sends a real Plus! command, Messenger Plus! installed on your computer will react on this. In other words, Plus! will not react on text send by the user, it must be a Plus! command. In other words, your contact needs to have Plus! (and the plugin) installed also!

This post was edited on 11-25-2005 at 02:00 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
11-25-2005 01:59 PM
Profile PM Find Quote Report
npc
New Member
*


Posts: 5
Joined: Nov 2005
O.P. RE: plugin help needed (ReceiveNotify)
thanks for clearing that up. problems solved now.
11-25-2005 03:00 PM
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