Results 1 to 11 of 11

Thread: send text to msn chat control (web)

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2006
    Posts
    2

    send text to msn chat control (web)

    hello every 1
    i am new here so please help me
    i use Msn Chat Groups NOT Msn Messenger
    which uses the "Msn Chat Control"
    on a web page to connect and chat -i think you know it-
    i want to make a vb6 application that only
    sends a text to the text box that exisit in the chat control
    so i can write in the vb text box
    and the String sent to the control text box

    plz help me
    thank you

  2. #2
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142

    Re: send text to msn chat control (web)

    nice easy one ( i used to make chat bots for msn chat / groups chat many moons ago )
    but this is just a case of using FindWindow / FindWindowEx to locate the rich edit control for your message to Send.
    here's a quick example i put together just for you seeing as it's made me reminisce about the past
    VB Code:
    1. [COLOR=Blue]Private Declare Function[/COLOR] FindWindow [COLOR=Blue]Lib[/COLOR] "user32.dll" [COLOR=Blue]Alias[/COLOR] "FindWindowA" ([COLOR=Blue]ByVal[/COLOR] lpClassName [COLOR=Blue]As String[/COLOR], [COLOR=Blue]ByVal[/COLOR] lpWindowName [COLOR=Blue]As String[/COLOR]) [COLOR=Blue]As Long[/COLOR]
    2.     [COLOR=Blue]Private Declare Function[/COLOR] FindWindowEx [COLOR=Blue]Lib[/COLOR] "user32.dll" [COLOR=Blue]Alias[/COLOR] "FindWindowExA" ([COLOR=Blue]ByVal[/COLOR] hWnd1 [COLOR=Blue]As Long[/COLOR], [COLOR=Blue]ByVal[/COLOR] hWnd2 [COLOR=Blue]As Integer[/COLOR], [COLOR=Blue]ByVal[/COLOR] lpsz1 [COLOR=Blue]As String[/COLOR], [COLOR=Blue]ByVal[/COLOR] lpsz2 [COLOR=Blue]As String[/COLOR]) [COLOR=Blue]As Long[/COLOR]
    3.     [COLOR=Blue]Private Declare Function[/COLOR] SendMessage [COLOR=Blue]Lib[/COLOR] "user32.dll" [COLOR=Blue]Alias[/COLOR] "SendMessageA" ([COLOR=Blue]ByVal[/COLOR] hwnd [COLOR=Blue]As Long[/COLOR], [COLOR=Blue]ByVal[/COLOR] wMsg [COLOR=Blue]As Integer[/COLOR], [COLOR=Blue]ByVal[/COLOR] wParam [COLOR=Blue]As Integer[/COLOR], [COLOR=Blue]ByVal[/COLOR] lParam [COLOR=Blue]As String[/COLOR]) [COLOR=Blue]As Long[/COLOR]
    4.     [COLOR=Blue]Private Const[/COLOR] WM_SETTEXT [COLOR=Blue]As Integer[/COLOR] = &HC
    5.  
    6. [COLOR=Blue]Private Sub[/COLOR] Command1_Click()
    7.         [COLOR=Blue]Dim[/COLOR] IEFrame [COLOR=Blue]As Long[/COLOR]: IEFrame = FindWindow("IEFrame", [COLOR=Blue]vbNullString[/COLOR])
    8.         [COLOR=Blue]If Not[/COLOR] IEFrame = 0 [COLOR=Blue]Then[/COLOR]
    9.             [COLOR=Blue]Dim[/COLOR] shellDoc [COLOR=Blue]As Long[/COLOR]: shellDoc = FindWindowEx(IEFrame, 0, "Shell DocObject View", [COLOR=Blue]vbNullString[/COLOR])
    10.             [COLOR=Blue]If Not[/COLOR] shellDoc = 0 [COLOR=Blue]Then[/COLOR]
    11.                 [COLOR=Blue]Dim[/COLOR] IEServer [COLOR=Blue]As Long[/COLOR]: IEServer = FindWindowEx(shellDoc, 0, "Internet Explorer_Server", [COLOR=Blue]vbNullString[/COLOR])
    12.                 [COLOR=Blue]If Not[/COLOR] IEServer = 0 [COLOR=Blue]Then[/COLOR]
    13.                     [COLOR=Blue]Dim[/COLOR] IEDialog [COLOR=Blue]As Long[/COLOR]: IEDialog = FindWindowEx(IEServer, 0, "#32770", [COLOR=Blue]vbNullString[/COLOR])
    14.                     [COLOR=Blue]If Not[/COLOR] IEDialog = 0 [COLOR=Blue]Then[/COLOR]
    15.                         [COLOR=Blue]Dim[/COLOR] IEDialog1 [COLOR=Blue]As Long[/COLOR]: IEDialog1 = FindWindowEx(IEDialog, 0, "ATL:37243E88", [COLOR=Blue]vbNullString[/COLOR])
    16.                         [COLOR=Blue]If Not[/COLOR] IEDialog1 = 0 [COLOR=Blue]Then[/COLOR]
    17.                             [COLOR=Blue]Dim[/COLOR] RTFEdit [COLOR=Blue]As Long[/COLOR]: RTFEdit = FindWindowEx(IEDialog1, 0, "MSNChatEdit4", [COLOR=Blue]vbNullString[/COLOR])
    18.                             [COLOR=Blue]If Not[/COLOR] RTFEdit = 0 [COLOR=Blue]Then[/COLOR]
    19.                                 [COLOR=Green]'/// set the text to the MSNChatEdit4 box[/COLOR]
    20.                                 [COLOR=Blue]Call[/COLOR] SendMessage(RTFEdit, WM_SETTEXT, 256, "test 123")
    21. [COLOR=Blue]                            End If
    22.                         End If
    23.                     End If
    24.                 End If
    25.             End If
    26.         End If
    27. End Sub[/COLOR]
    ~
    if a post is resolved, please mark it as [Resolved]
    protected string get_Signature(){return Censored;}
    [vbcode][php] please use code tags when posting any code [/php][/vbcode]

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2006
    Posts
    2

    Re: send text to msn chat control (web)

    thank you very much
    some times it's good to have a flash back

  4. #4
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Re: send text to msn chat control (web)

    How send text to msn massanger window ? I be happy if u show me how.Thanks

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: send text to msn chat control (web)

    If you really want to get into it take a look at wokawidgets Badger Messenger code example -

    http://www.vbforums.com/showthread.php?p=1927755
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Re: send text to msn chat control (web)

    Quote Originally Posted by RobDog888
    If you really want to get into it take a look at wokawidgets Badger Messenger code example -

    http://www.vbforums.com/showthread.php?p=1927755
    oh i just want to be able to put the text in msn textbox and hit enter. I do not want to log in to msn server!!

  7. #7
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: send text to msn chat control (web)

    Then you will want to use the same APIs and just change the window class name to whatever it is in your version. You can use MS Spy++ to find it. Or if you dont have Spy++ you can use something like this codebank code example -

    http://vbforums.com/showthread.php?t=337952
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  8. #8
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Re: send text to msn chat control (web)

    Quote Originally Posted by RobDog888
    Then you will want to use the same APIs and just change the window class name to whatever it is in your version. You can use MS Spy++ to find it. Or if you dont have Spy++ you can use something like this codebank code example -

    http://vbforums.com/showthread.php?t=337952
    May i know what api u are referaing to ? i have api syp .just tell me what api allow me send text to textbox in external textobox?

  9. #9
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: send text to msn chat control (web)

    Post #2.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  10. #10
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Re: send text to msn chat control (web)

    Quote Originally Posted by RobDog888
    Post #2.
    could u tell me what controles an refrences do i need and also which one is window class name so i change to textbox class name of my yahoo massanger or any other massager with textbox. The textbox is not on the web it is in external application so u think this will work?Thank


    these are info from the textbox in external massanger. which one should i use and where?:

    RichEdit20A
    #32770
    AtlAxWin71
    ATL:0053D798
    WTL_SplitterWindow
    WTL_SplitterWindow
    WTL_SplitterWindow
    My Window Class

    I made a command button and a textbox and named it RTFEdit and use
    RichEdit20A this in line :

    Dim IEFrame As Long: IEFrame = FindWindow("RichEdit20A", vbNullString)

    but it did not work!! could u tell me what i am doing wrong ?Thanks
    Last edited by tony007; May 24th, 2006 at 09:09 AM.

  11. #11
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: send text to msn chat control (web)

    I dont have or use Yahoo.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

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