Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send messages to Skype "group" chat from .NET?

Is there an easy way to send group chat messages to Skype from .NET? I don't need to respond to any commands or anything, so it doesn't need to be a BOT. Basically, I would run this program on a dedicated box with Skype running as a special user and I would have it report certain information to a specific group chat.

I understand there is a Skype COM library. I have seen examples based on that but I haven't been able to get any traction.

like image 948
Brian David Berman Avatar asked May 10 '11 17:05

Brian David Berman


People also ask

Where is group settings on Skype?

Manage group button next to the group name to open the profile. Add or update a group picture: Select the group photo to upload a photo or remove the photo. Change your group name: Select the Edit text button next to your group name to type a new one.


1 Answers

The currently available Skype API for Windows uses WM_COPYDATA to exchange text-based commands for controlling Skype (see the Public API Reference download). There is a new thing called SkypeKit in development but it's a closed beta so I don't know what it will do to enhance the experience.

There appear to have been a few projects here and there that have wrapped the existing public API with some .NET-based calls using C#. These either wrap the basic level messaging system or the COM wrapper, Skype4COM (as you have already seen). A Google search gave me these results that seem to get you started:

  • Controlling Skype with C#
  • How to do Skype in C#
  • C# Example Project for Skype4COM

Based on your experiences, I would look at the first item in this list as it appears to be a directly interacting with the Windows messages (i.e. WM_COPYDATA) rather than Skype4COM.

Sending a chat message to a group
Assuming you utilise the C# wrappers referenced above, here is a rough idea of the commands you'll need from the public API in order to send a chat message to a group.

The command to start a chat is CHAT CREATE. It appears from the documentation that you have to specify each recipient (or target, as the written in the API reference) individually. Whether this can be a group name or not is not made clear, however, the GET GROUP USERS command enables you to obtain the individual users within a specific group.

Once you have a chat, you can use the CHATMESSAGE command to actually post a message.

like image 83
Jeff Yates Avatar answered Sep 24 '22 06:09

Jeff Yates