|
-
May 6th, 2006, 04:22 AM
#1
Thread Starter
New Member
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
-
May 6th, 2006, 12:06 PM
#2
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:
[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]
[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]
[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]
[COLOR=Blue]Private Const[/COLOR] WM_SETTEXT [COLOR=Blue]As Integer[/COLOR] = &HC
[COLOR=Blue]Private Sub[/COLOR] Command1_Click()
[COLOR=Blue]Dim[/COLOR] IEFrame [COLOR=Blue]As Long[/COLOR]: IEFrame = FindWindow("IEFrame", [COLOR=Blue]vbNullString[/COLOR])
[COLOR=Blue]If Not[/COLOR] IEFrame = 0 [COLOR=Blue]Then[/COLOR]
[COLOR=Blue]Dim[/COLOR] shellDoc [COLOR=Blue]As Long[/COLOR]: shellDoc = FindWindowEx(IEFrame, 0, "Shell DocObject View", [COLOR=Blue]vbNullString[/COLOR])
[COLOR=Blue]If Not[/COLOR] shellDoc = 0 [COLOR=Blue]Then[/COLOR]
[COLOR=Blue]Dim[/COLOR] IEServer [COLOR=Blue]As Long[/COLOR]: IEServer = FindWindowEx(shellDoc, 0, "Internet Explorer_Server", [COLOR=Blue]vbNullString[/COLOR])
[COLOR=Blue]If Not[/COLOR] IEServer = 0 [COLOR=Blue]Then[/COLOR]
[COLOR=Blue]Dim[/COLOR] IEDialog [COLOR=Blue]As Long[/COLOR]: IEDialog = FindWindowEx(IEServer, 0, "#32770", [COLOR=Blue]vbNullString[/COLOR])
[COLOR=Blue]If Not[/COLOR] IEDialog = 0 [COLOR=Blue]Then[/COLOR]
[COLOR=Blue]Dim[/COLOR] IEDialog1 [COLOR=Blue]As Long[/COLOR]: IEDialog1 = FindWindowEx(IEDialog, 0, "ATL:37243E88", [COLOR=Blue]vbNullString[/COLOR])
[COLOR=Blue]If Not[/COLOR] IEDialog1 = 0 [COLOR=Blue]Then[/COLOR]
[COLOR=Blue]Dim[/COLOR] RTFEdit [COLOR=Blue]As Long[/COLOR]: RTFEdit = FindWindowEx(IEDialog1, 0, "MSNChatEdit4", [COLOR=Blue]vbNullString[/COLOR])
[COLOR=Blue]If Not[/COLOR] RTFEdit = 0 [COLOR=Blue]Then[/COLOR]
[COLOR=Green]'/// set the text to the MSNChatEdit4 box[/COLOR]
[COLOR=Blue]Call[/COLOR] SendMessage(RTFEdit, WM_SETTEXT, 256, "test 123")
[COLOR=Blue] End If
End If
End If
End If
End If
End If
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]
-
May 7th, 2006, 07:33 AM
#3
Thread Starter
New Member
Re: send text to msn chat control (web)
thank you very much
some times it's good to have a flash back
-
May 24th, 2006, 03:03 AM
#4
Frenzied Member
Re: send text to msn chat control (web)
How send text to msn massanger window ? I be happy if u show me how.Thanks
-
May 24th, 2006, 03:34 AM
#5
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
May 24th, 2006, 03:39 AM
#6
Frenzied Member
Re: send text to msn chat control (web)
 Originally Posted by RobDog888
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!!
-
May 24th, 2006, 03:44 AM
#7
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
May 24th, 2006, 04:01 AM
#8
Frenzied Member
Re: send text to msn chat control (web)
 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?
-
May 24th, 2006, 04:04 AM
#9
Re: send text to msn chat control (web)
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
May 24th, 2006, 09:01 AM
#10
Frenzied Member
Re: send text to msn chat control (web)
 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.
-
May 24th, 2006, 12:43 PM
#11
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|