What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » Custom Sounds Plugin - HELP [now it is getting really weird...]

Custom Sounds Plugin - HELP [now it is getting really weird...]
Author: Message:
rh
Full Member
***


Posts: 115
– / Male / –
Joined: Mar 2003
O.P. Custom Sounds Plugin - HELP [now it is getting really weird...]
hi!

i have created a custom sounds plugin... very quick'n'dirty but who cares :D

it plays any sound that is located on some server through an embedded Windows Media Component. so before usin a custom sound, you will have to upload the file to a server, but it think this should be acceptable, because it makes possible streamed playback (without transfering the whole file first) and also gives a certain flooding-protection (because windows media only plays one file at a time).

the plugin is nearly done, just transfering the command to play the sound to the other person does not work. i used the ping-pong-example by patchou and changed just very few things still it simply does not work; the ReceiveNotify-function is not called at all!

would be nice if you could help me! thanks a lot!

rupert

p.s.: here's my code:

code:
'//////////////////////////////////////////////////////////////////////
'//                                                                  //
'// Project: Messenger Plus! simple plugin in Visual Basic           //
'// Author: Patchou                                                  //
'// Last Update: 2003/07/06                                          //
'//                                                                  //
'// For more help, please read the documentation in MPPluginDef.cls  //
'// and in MPPluginConst.bas                                         //
'//                                                                  //
'//////////////////////////////////////////////////////////////////////
Option Explicit


'//////////////////////////////////////////////////////////////////////
'//                                                                  //
'// Purpose: Initialization function                                 //
'//                                                                  //
'//////////////////////////////////////////////////////////////////////
Public Function Initialize(ByVal nVersion As Long, ByVal sUserEmail As String, ByVal oMessenger As Object) As Boolean
    Initialize = True
End Function


'//////////////////////////////////////////////////////////////////////
'//                                                                  //
'// Purpose: Uninitialization function                               //
'//                                                                  //
'//////////////////////////////////////////////////////////////////////
Public Function Uninitialize()
End Function


'//////////////////////////////////////////////////////////////////////
'//                                                                  //
'// Purpose: Provide new commands in Messenger Plus!                 //
'//                                                                  //
'//////////////////////////////////////////////////////////////////////
Public Function ParseCommand(ByVal sCommand As String, ByVal sCommandArg As String, ByVal oConversationWnd As Object, ByRef sResult As String) As Boolean
           
    'The second sample command simulates a !ping request. See
    'ReceiveNotify() for more information. You could improve it by ignoring
    'the next ReceiveNotify() call to avoid a local answer (obviously, you
    'can ping yourself).
    If (StrComp(LCase(sCommand), "/xcustomsound", vbTextCompare) = 0) Then
        sResult = Chr(nCCNotify) + "xcsnd" 'The notify code must be 5 characters long
        sResult = sResult + sCommandArg
        Load Form1
        Form1.MediaPlayer1.FileName = sCommandArg
        Form1.MediaPlayer1.Play
       
       
        ParseCommand = True
        Exit Function
    End If
   
    'Give other plugins a chance to parse this command
    ParseCommand = False
End Function


'//////////////////////////////////////////////////////////////////////
'//                                                                  //
'// Purpose: Provide new tags in Messenger Plus!                     //
'//                                                                  //
'//////////////////////////////////////////////////////////////////////
Public Function ParseTag(ByVal sTag As String, ByVal oConversationWnd As Object, ByRef sResult As String) As Boolean
 
    'Give other plugins a chance to parse this tag
    ParseTag = False
End Function


'//////////////////////////////////////////////////////////////////////
'//                                                                  //
'// Purpose: Allow special actions when a plugin text is received    //
'//                                                                  //
'//////////////////////////////////////////////////////////////////////
Public Function ReceiveNotify(ByVal sNotifyCode As String, ByVal sText As String, ByVal oConversationWnd As Object, ByRef sTextToSend As String) As Boolean
  MsgBox ("Debug: -" & sText & "-")
    'This sample responds to a !ping request sent by /xpingvb
    If (StrComp(sNotifyCode, "xcsnd", vbTextCompare) = 0) Then
       
        Load Form1
        Form1.MediaPlayer1.FileName = sText
        Form1.MediaPlayer1.Play
        sTextToSend = "[Succesfully played.]"
       
        ReceiveNotify = True
        Exit Function
    End If
   
    'Give other plugins a chance to receive this notification
    ReceiveNotify = False
End Function


This post was edited on 07-15-2003 at 11:25 AM by rh.
07-14-2003 10:16 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Custom Sounds Plugin - HELP [now it is getting really weird...] - by rh on 07-14-2003 at 10:16 AM
RE: Custom Sounds Plugin - HELP - by Xerxis on 07-14-2003 at 10:51 AM
RE: Custom Sounds Plugin - HELP - by rh on 07-14-2003 at 12:42 PM
RE: Custom Sounds Plugin - HELP - by Whacko on 07-14-2003 at 01:03 PM
RE: Custom Sounds Plugin - HELP - by rh on 07-14-2003 at 01:55 PM
RE: Custom Sounds Plugin - HELP - by rh on 07-14-2003 at 01:56 PM
RE: Custom Sounds Plugin - HELP - by Whacko on 07-14-2003 at 02:28 PM
RE: Custom Sounds Plugin - HELP - by rh on 07-14-2003 at 02:34 PM
RE: Custom Sounds Plugin - HELP - by rh on 07-15-2003 at 10:09 AM
RE: Custom Sounds Plugin - HELP - by Xerxis on 07-15-2003 at 10:36 AM
RE: Custom Sounds Plugin - HELP - by rh on 07-15-2003 at 11:10 AM
RE: Custom Sounds Plugin - HELP - by rh on 07-15-2003 at 11:24 AM
RE: Custom Sounds Plugin - HELP [now it is getting really weird...] - by rh on 07-15-2003 at 01:50 PM


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