What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » Toasts on receivers pc

Toasts on receivers pc
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Toasts on receivers pc
I was having the same problem with my Remote Shutdown Plugin I was designing, the only work around I had was sending the UserEmail (recieved at Initialization) with the message and compare it to the one on the computer if its the same dont do anything but if its different then display the toast. Whats happening is when you type in the command the plugin on your computer gets the RecieveNotify code to because its in the convo window.

code:
Public Function Initialize(ByVal nVersion As Long, ByVal sUserEmail As String, ByVal oMessenger As Object) As Boolean
    Initialize = True
    strUserEmail = sUserEmail
End Function


code:
sResult = Chr(nCCNotify) + "showm" + "Display Toast " + vbCrLf + "Text: " + sCommandArg + vbCrLf + "Email: " + strUserEmail


code:
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

    If (StrComp(sNotifyCode, "showm", vbTextCompare) = 0) Then
        Dim sptRecievedText() As String
        strSplit sText, sptRecievedText(), Chr(13)
        sptRecievedText(1) = Replace(sptRecievedText(1), "Text: ", "")
        sptRecievedText(2) = Replace(sptRecievedText(2), "Email: ", "")

       If sptRecievedText(2) = strUserEmail Then
            ReceiveNotify = False
            Exit Function
        Else
            DisplayToast sptRecievedText(2), "myplugin", "", True
            ReceiveNotify = True
            Exit Function
        End If
    End If
    ReceiveNotify = False
End Function

Here is a good Split Function I found on PSC (Put This Into A Module
code:
Public strUserEmail As String

Public Function strSplit(ByVal Sin As String, sOut() As String, Optional sDelim As String, Optional nLimit As Long = -1, Optional bCompare As VbCompareMethod = vbBinaryCompare) As Variant
   Dim sRead As String
   If sDelim = "" Then sDelim = " "
   If InStr(Sin, sDelim) = 0 Then
        ReDim sOut(0) As String
        sOut(0) = Sin
        strSplit = sOut
        Exit Function
   End If
   sRead = ReadUntil(Sin, sDelim, bCompare)
   Do
      ReDim Preserve sOut(nC)
      sOut(nC) = sRead
      nC = nC + 1
      If nLimit <> -1 And nC >= nLimit Then Exit Do
      sRead = ReadUntil(Sin, sDelim)
   Loop While sRead <> "~TWA"
   ReDim Preserve sOut(nC)
   sOut(nC) = Sin
   strSplit = sOut
End Function
Public Function ReadUntil(ByRef Sin As String, sDelim As String, Optional bCompare As VbCompareMethod = vbBinaryCompare) As String
Dim nPos As Long
nPos = InStr(1, Sin, sDelim, bCompare)
If nPos > 0 Then
   ReadUntil = Left(Sin, nPos - 1)
   Sin = Mid(Sin, nPos + Len(sDelim))
Else
   ReadUntil = "~TWA"
End If
End Function
07-19-2004 04:16 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Toasts on receivers pc - by m0m0 on 07-19-2004 at 10:52 AM
RE: Toasts on receivers pc - by (CyBeRDuDe) on 07-19-2004 at 12:02 PM
RE: Toasts on receivers pc - by matty on 07-19-2004 at 04:16 PM
RE: Toasts on receivers pc - by Millenium_edition on 07-19-2004 at 04:21 PM
RE: Toasts on receivers pc - by matty on 07-19-2004 at 04:28 PM
RE: Toasts on receivers pc - by Millenium_edition on 07-19-2004 at 06:26 PM
RE: Toasts on receivers pc - by matty on 07-19-2004 at 06:41 PM
RE: Toasts on receivers pc - by m0m0 on 07-19-2004 at 08:26 PM
RE: Toasts on receivers pc - by Millenium_edition on 07-19-2004 at 08:39 PM
RE: Toasts on receivers pc - by m0m0 on 07-19-2004 at 08:46 PM
RE: Toasts on receivers pc - by Millenium_edition on 07-19-2004 at 08:59 PM
RE: Toasts on receivers pc - by m0m0 on 07-19-2004 at 09:09 PM
RE: Toasts on receivers pc - by Millenium_edition on 07-19-2004 at 09:12 PM
RE: Toasts on receivers pc - by m0m0 on 07-19-2004 at 09:17 PM
RE: Toasts on receivers pc - by Millenium_edition on 07-19-2004 at 09:21 PM
RE: Toasts on receivers pc - by m0m0 on 07-19-2004 at 09:44 PM
RE: Toasts on receivers pc - by matty on 07-19-2004 at 10:35 PM
RE: Toasts on receivers pc - by TazDevil on 06-01-2005 at 05:40 PM
RE: Toasts on receivers pc - by Mike on 06-01-2005 at 05:55 PM
RE: Toasts on receivers pc - by TazDevil on 06-01-2005 at 06:04 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