Results 1 to 4 of 4

Thread: Question about MSN

  1. #1

    Thread Starter
    Junior Member SkettaLEE's Avatar
    Join Date
    Oct 2001
    Location
    Shaw AFB, SC
    Posts
    30

    Question about MSN

    How can i make my program type in MSN Messenger? Like an Away For Keyboard bot or something. When someone comes up and I make it send a message to them saying something... I try with SendMessage WM_SETTEXT or whatever and instead of the words i want......... it gives me characters.... Ill show you what My code is right now :

    PHP Code:
    On Error GoTo DamnyoMomma


    For TheNum 0 To lsthandle.ListCount
    Instant
    % = lsthandle.List(TheNum)

    Win% = GetWindow(Instant%, GW_CHILD)

    Do
    Text2$ = GetClass(Win%)

    If 
    Text2$ = "RichEdit20A" Then Exit Do

    Win% = GetWindow(Win%, GW_HWNDNEXT)
    Loop Until Win% = 0

    WinEdit
    % = GetWindow(Win%, GW_HWNDNEXT)
    WinEdit% = GetWindow(WinEdit%, GW_HWNDNEXT)
    Text2$ = GetClass(WinEdit%)
    'MsgBox Text2$


    Text& = SendMessage(Win%, WM_GETTEXTLENGTH, 0&, 0&)
    Cursor$ = String(Text&, 0&)
    Call SendMessageByString(Win%, WM_GETTEXT, Text& + 1, Cursor$)
    If Cursor$ = DogImCountingn Then Exit Sub
    DogImCounting = Cursor$

        Do While InStr(Cursor$, ":")
            d = InStr(Cursor$, ":")
            LastOfIt = Mid$(Cursor$, d + 1, Len(Cursor$))
            If InStr(LastOfIt, ":") = False Then
                Exit Do
            Else
                Cursor$ = LastOfIt
            End If
        Loop
    Cursor$ = Right$(LastOfIt, Len(LastOfIt) - 2)

    This is the line of code that does the commands for
    ' whatever the user types in

    If InStr(LCase(Cursor$), "end") Then End
    If InStr(LCase(Cursor$), "hello") Then
    SendMessage WinEdit%, WM_SETTEXT, ByVal 0, "Sorry im not here"
    End If

    Next TheNum
    DamnyoMomma: 
    On my program it has a listbox with all the handles of the current open message windows..


    Some please help me!
    This is our world now, The world of the pop-trunk and the switch.
    The beauty of my Broad :-)
    We wage wars, murder, cheat, lie to our women and make them believe its for their own good. And we're the criminals.
    My crime is but of pimpology.
    I am a Pimp, and this is my manefesto!

  2. #2
    DaoK
    Guest
    If you are using vb use : [vbcode ] CODE HERE [ / vbcode]

  3. #3
    DaoK
    Guest
    VB Code:
    1. On Error GoTo DamnyoMomma
    2.  
    3.  
    4. For TheNum = 0 To lsthandle.ListCount
    5. Instant% = lsthandle.List(TheNum)
    6.  
    7. Win% = GetWindow(Instant%, GW_CHILD)
    8.  
    9. Do
    10. Text2$ = GetClass(Win%)
    11.  
    12. If Text2$ = "RichEdit20A" Then Exit Do
    13.  
    14. Win% = GetWindow(Win%, GW_HWNDNEXT)
    15. Loop Until Win% = 0
    16.  
    17. WinEdit% = GetWindow(Win%, GW_HWNDNEXT)
    18. WinEdit% = GetWindow(WinEdit%, GW_HWNDNEXT)
    19. Text2$ = GetClass(WinEdit%)
    20. 'MsgBox Text2$
    21.  
    22.  
    23. Text& = SendMessage(Win%, WM_GETTEXTLENGTH, 0&, 0&)
    24. Cursor$ = String(Text&, 0&)
    25. Call SendMessageByString(Win%, WM_GETTEXT, Text& + 1, Cursor$)
    26. If Cursor$ = DogImCountingn Then Exit Sub
    27. DogImCounting = Cursor$
    28.  
    29.     Do While InStr(Cursor$, ":")
    30.         d = InStr(Cursor$, ":")
    31.         LastOfIt = Mid$(Cursor$, d + 1, Len(Cursor$))
    32.         If InStr(LastOfIt, ":") = False Then
    33.             Exit Do
    34.         Else
    35.             Cursor$ = LastOfIt
    36.         End If
    37.     Loop
    38. Cursor$ = Right$(LastOfIt, Len(LastOfIt) - 2)
    39.  
    40. ' This is the line of code that does the commands for
    41. ' whatever the user types in
    42.  
    43. If InStr(LCase(Cursor$), "end") Then End
    44. If InStr(LCase(Cursor$), "hello") Then
    45. SendMessage WinEdit%, WM_SETTEXT, ByVal 0, "Sorry im not here"
    46. End If
    47.  
    48. Next TheNu

  4. #4
    DaoK
    Guest
    This link might help you : Link #1

    Link #2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width