What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » idea!! note plugin

idea!! note plugin
Author: Message:
Wouter
Full Member
***

Avatar

Posts: 252
Reputation: 3
39 / Male / –
Joined: Jul 2003
Status: Away
RE: idea!! note plugin
code:
Public Function ParseCommand(ByVal sCommand As String, ByVal sCommandArg As String, ByVal oConversationWnd As Object, ByRef sResult As String) As Boolean
    If (StrComp(LCase(sCommand), "/xnote", vbTextCompare) = 0) Then
        Open getstring(HKEY_CURRENT_USER, "Software\Patchou\MsgPlus2\wouter@reclames.net\Archive\" & email & ".txt", "FileName") For Append As #1
        Print #1, "[" & Time & "] " & sCommandArg
        Close 1
        'Send back an empty string to cancel the message
        sResult = ""
        ParseCommand = True
        Exit Function
    End If
   
    'Give other plugins a chance to parse this command
    ParseCommand = False
End Function


code:
Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal Hkey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal Hkey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, lpType As Long, lpData As Any, lpcbData As Long) As Long

Public Const HKEY_CLASSES_ROOT = &H80000000
Public Const HKEY_CURRENT_USER = &H80000001
Public Const HKEY_LOCAL_MACHINE = &H80000002
Public Const HKEY_USERS = &H80000003
Public Const HKEY_PERFORMANCE_DATA = &H80000004
Public Const ERROR_SUCCESS = 0&
Public Const REG_SZ = 1

Public Function getstring(Hkey As Long, strPath As String, strValue As String)
    Dim keyhand As Long
    Dim datatype As Long
    Dim lResult As Long
    Dim strBuf As String
    Dim lDataBufSize As Long
    Dim intZeroPos As Integer
    r = RegOpenKey(Hkey, strPath, keyhand)
    lResult = RegQueryValueEx(keyhand, strValue, 0&, lValueType, ByVal 0&, lDataBufSize)


    If lValueType = REG_SZ Then
        strBuf = String(lDataBufSize, " ")
        lResult = RegQueryValueEx(keyhand, strValue, 0&, 0&, ByVal strBuf, lDataBufSize)


        If lResult = ERROR_SUCCESS Then
            intZeroPos = InStr(strBuf, Chr$(0))


            If intZeroPos > 0 Then
                getstring = Left$(strBuf, intZeroPos - 1)
            Else
                getstring = strBuf
            End If
        End If
    End If
End Function

[Image: 1497.jpg]      [Image: qbase.jpg]
07-14-2004 04:51 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
idea!! note plugin - by trev on 07-13-2004 at 05:58 PM
RE: idea!! note plugin - by Stigmata on 07-13-2004 at 06:00 PM
RE: idea!! note plugin - by crank on 07-13-2004 at 06:08 PM
RE: idea!! note plugin - by Millenium_edition on 07-13-2004 at 07:54 PM
RE: idea!! note plugin - by trev on 07-14-2004 at 07:23 AM
RE: idea!! note plugin - by Sk3tch on 07-14-2004 at 08:07 AM
RE: idea!! note plugin - by Guido on 07-14-2004 at 01:47 PM
RE: idea!! note plugin - by Wouter on 07-14-2004 at 04:51 PM
RE: idea!! note plugin - by Mike on 07-14-2004 at 04:54 PM
RE: idea!! note plugin - by Mnjul on 07-14-2004 at 04:55 PM
RE: RE: idea!! note plugin - by Wouter on 07-14-2004 at 04:57 PM
RE: idea!! note plugin - by Wouter on 07-14-2004 at 04:56 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