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

Altering incoming text
Author: Message:
optimism_
Senior Member
****

Avatar
Ctrl+Alt+Del - Tragically l337

Posts: 521
Reputation: 8
37 / Male / –
Joined: Jul 2003
RE: Altering incoming text
reading the documentation helps tbh

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. //
//     * pParam: additional information sent by Messenger Plus!. For  //
//       more information, read the documentation of the PLUGIN_PARAM //
//       structure. iConversationWnd and sContactName are used.        //
//     * 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. Important: the size of this buffer is 4096 characters    //
//       and it is YOUR responsability to verify that you don't write //
//       more characters to avoid memory faults.
//     * 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 '\n' 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.                        //
//                                                                    //
//////////////////////////////////////////////////////////////////////                     
MPPLUGIN_RETURN_BOOL ReceiveNotify(/*[in]*/  const char* sNotifyCode,
                                   /*[in]*/  const char* sText,
                                   /*[in]*/  PLUGIN_PARAM* pParam,
                                   /*[out]*/ char* sTextToSend);


sText is an incomming/read only variable. You cannot chnage it (yes i know this is the c++ code but the vb code is the same).

Yes you can read what the user typed, eg
[]mcodeThis is My Message
sText contains "This is My Message"

but you CANNOT change it
HTTP 404 - Signature Not Found
04-24-2004 12:31 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Altering incoming text - by RooJ on 04-23-2004 at 02:41 PM
RE: Altering incoming text - by Choli on 04-23-2004 at 03:49 PM
RE: Altering incoming text - by eXXon on 04-23-2004 at 04:19 PM
RE: RE: Altering incoming text - by optimism_ on 04-23-2004 at 04:37 PM
RE: Altering incoming text - by Choli on 04-23-2004 at 04:44 PM
RE: Altering incoming text - by eXXon on 04-23-2004 at 04:49 PM
RE: Altering incoming text - by Choli on 04-23-2004 at 04:52 PM
RE: Altering incoming text - by optimism_ on 04-23-2004 at 04:59 PM
RE: Altering incoming text - by RooJ on 04-23-2004 at 05:14 PM
RE: Altering incoming text - by RooJ on 04-23-2004 at 11:46 PM
RE: Altering incoming text - by optimism_ on 04-23-2004 at 11:50 PM
RE: Altering incoming text - by RooJ on 04-24-2004 at 12:18 AM
RE: Altering incoming text - by optimism_ on 04-24-2004 at 12:23 AM
RE: Altering incoming text - by RooJ on 04-24-2004 at 12:38 AM
RE: Altering incoming text - by Mike on 04-24-2004 at 05:03 AM
RE: Altering incoming text - by RooJ on 04-24-2004 at 12:25 PM
RE: Altering incoming text - by optimism_ on 04-24-2004 at 12:31 PM
RE: Altering incoming text - by Choli on 04-24-2004 at 12:48 PM
RE: Altering incoming text - by optimism_ on 04-24-2004 at 12:54 PM
RE: Altering incoming text - by Mike on 04-24-2004 at 01:14 PM
RE: Altering incoming text - by RooJ on 04-24-2004 at 01:32 PM
RE: Altering incoming text - by Mike on 04-24-2004 at 01:34 PM
RE: Altering incoming text - by Choli on 04-24-2004 at 01:55 PM
RE: Altering incoming text - by RooJ on 04-24-2004 at 02:07 PM
RE: Altering incoming text - by Mike on 04-24-2004 at 02:09 PM
RE: Altering incoming text - by optimism_ on 04-24-2004 at 02:21 PM
RE: Altering incoming text - by RooJ on 04-24-2004 at 02:35 PM
RE: RE: Altering incoming text - by optimism_ on 04-24-2004 at 09:37 PM
RE: Altering incoming text - by Choli on 04-24-2004 at 02:47 PM
RE: Altering incoming text - by RooJ on 04-24-2004 at 03:04 PM
RE: Altering incoming text - by Choli on 04-24-2004 at 03:21 PM
RE: Altering incoming text - by RooJ on 04-24-2004 at 11:06 PM
RE: Altering incoming text - by optimism_ on 04-25-2004 at 03:51 PM
RE: Altering incoming text - by RooJ on 04-26-2004 at 01:09 AM


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