What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » MSNCrypt Encryption Plugin

MSNCrypt Encryption Plugin
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: MSNCrypt Encryption Plugin
quote:
Originally posted by RooJ
ne of matty's projects read from the conversation window and in turn could also be changed to write to it. The only problem is it works on a point and click basis, im not sure how to locate the childwindow through code as the api ive tried came up empty.

Declarations:
code:
Public Declare Function FindWindowExA Lib "user32.dll" (ByVal hWnd1 As Long, _
                                                        ByVal hwnd2 As Long, _
                                                        ByVal lpsz1 As String, _
                                                        ByVal lpsz2 As String) _
                                                        As Long
Public Declare Sub
AccessibleObjectFromWindow Lib "OLEACC.dll" (ByVal hwnd As Long, _
                                                                ByVal dwId As Long, _
                                                                ByRef riid As Guid, _
                                                                ByRef ppvObject As Object)
Public Declare Function AccessibleChildren Lib "oleacc" (ByVal paccContainer As IAccessible, _
                                                         ByVal iChildStart As Long, _
                                                         ByVal cChildren As Long, _
                                                         rgvarChildren As Variant, _
                                                         pcObtained As Long) _
                                                         As Long


Public Const
CHILDID_SELF As Long = 0
Public Const CHILDID_1 As Long = 1
Public Const OBJID_CLIENT As Long = &HFFFFFFFC
Public IID_IAccessible As Guid
Public Type Guid
    Data1 As Long
    Data2 As Integer
    Data3 As Integer
    Data4(0 To 7) As Byte
End Type

Public Const
NAVDIR_NEXT As Long = 5
Public Const NAVDIR_FIRSTCHILD As Long = 7


ParseCommand Function:
code:
Public Function ParseCommand(ByVal sCommand As String, _
                             ByVal sCommandArg As String, _
                             ByVal oConversationWnd As Object, _
                             ByRef sResult As String) _
                             As Boolean
                             
Dim
ConversationWnd_Obj As Object
Dim
lngTMP As IAccessible
Dim
iTMP As IAccessible
Dim
lngTMP2 As Long
Dim
lngCount As Long
Dim
accChildren() As Variant
                   
    Set
ConversationWnd_Obj = oConversationWnd
     Select Case LCase(sCommand)
     Case Is = "/xtest" '//Change to whatever you want your command to be
       
        Call AccessibleObjectFromWindow(FindWindowExA(ConversationWnd_Obj.hwnd, _
                                                      0, _
                                                      "DirectUIHWND", _
                                                      vbNullString), _
                                        OBJID_CLIENT, _
                                        IID_IAccessible, _
                                        lngTMP)
        If Not lngTMP Is Nothing Then
            Set
iTMP = lngTMP.accParent
            ReDim accChildren(lngCount - 1)
            Call AccessibleChildren(iTMP, 0, iTMP.accChildCount - 1, accChildren(0), lngTMP2)
            For lngCount = 0 To iTMP.accChildCount - 1
                DoEvents
                If accChildren(lngCount).accName(CHILDID_SELF) = "Input" Then
                    accChildren(lngCount).accValue(CHILDID_SELF) = "You see this so you know it's working!"
                    Exit For
                End If
            Next
        End If
       
        Set
ConversationWnd_Obj = Nothing
        sResult = ""
        ParseCommand = True
        Exit Function
    End Select

    ParseCommand = False
End Function


This post was edited on 11-28-2005 at 05:37 AM by matty.
11-28-2005 05:24 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
MSNCrypt Encryption Plugin - by RooJ on 11-27-2005 at 02:10 AM
RE: MSNCrypt Encryption Plugin - by eSouL on 11-27-2005 at 06:42 AM
RE: MSNCrypt Encryption Plugin - by STA1661 on 11-27-2005 at 07:09 AM
RE: MSNCrypt Encryption Plugin - by eSouL on 11-27-2005 at 08:21 AM
RE: MSNCrypt Encryption Plugin - by RooJ on 11-27-2005 at 02:47 PM
RE: MSNCrypt Encryption Plugin - by eSouL on 11-27-2005 at 07:01 PM
RE: MSNCrypt Encryption Plugin - by RooJ on 11-27-2005 at 08:02 PM
RE: MSNCrypt Encryption Plugin - by matty on 11-28-2005 at 05:24 AM
RE: MSNCrypt Encryption Plugin - by Dempsey on 11-28-2005 at 10:10 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