pbarrette
21-06-2005, 20:32
Hi all,
I posted this the other day in a different thread, but I realize that it is something that others may be trying to do as well.
http://www.peterbarrette.com/Downloads/TsGetText.zip
This is the source code to a very simple application written in C# .NET with VS1.1 which can pull the text out of the Teamspeak chat box.
It does this by using FindWindowEx to get a handle to the Teamspeak "TRichEditWithLinks" window. It then uses SendMessage to send a WM_GETTEXT request to the Teamspeak chat window. The window replies by dumping the contents of the window to your specified receive buffer.
The program is as simple as it gets. A single form with a single textbox and a single button. When the button is pressed, the Teamspeak chat window text is displayed in the textbox.
I was originally trying to do this to incorporate join/quit/channel change messages into my TsShow program. I stopped updating that program long ago, but stumbled into the solution while working on another project.
Hopefully this is something that someone out there can use in their project.
pb
I posted this the other day in a different thread, but I realize that it is something that others may be trying to do as well.
http://www.peterbarrette.com/Downloads/TsGetText.zip
This is the source code to a very simple application written in C# .NET with VS1.1 which can pull the text out of the Teamspeak chat box.
It does this by using FindWindowEx to get a handle to the Teamspeak "TRichEditWithLinks" window. It then uses SendMessage to send a WM_GETTEXT request to the Teamspeak chat window. The window replies by dumping the contents of the window to your specified receive buffer.
The program is as simple as it gets. A single form with a single textbox and a single button. When the button is pressed, the Teamspeak chat window text is displayed in the textbox.
I was originally trying to do this to incorporate join/quit/channel change messages into my TsShow program. I stopped updating that program long ago, but stumbled into the solution while working on another project.
Hopefully this is something that someone out there can use in their project.
pb