Missed chats in Skype using C #

I am trying to display unread chats from skype in my C # application. I used int msgCount=skype.MissedMessages.Count to get the number of unread messages and tried the given functions skype.MissedChats.ToString() and skype.get_Message(msgCount).ToString() . But they display "System._ComObject". Any suggestions???

+4
source share
2 answers

The answer is so simple, and I understood it as follows.

  for (int i = 0; i < skype.MissedMessages.Count; i++) { if (skype.MissedMessages[i + 1].Type == TChatMessageType.cmeSaid) { string unreadMessage = skype.MissedMessages[i + 1].Body; } } 

You can read other data, such as the sender name skype.MissedMessages[i + 1].Sender

+4
source

I would suggest that this would require you to use an indexer to actually display the contents of one particular chat message. You are currently converting ChatCollection to a string, and I would suggest that they did not implement this, so it just returns this.GetType().Name .

I would suggest that the indexer would work as follows:

 List<string> messages = new List<string>(); foreach (Char c in skype.MissedChats) { try { messages.Add(c.Name); } catch (COMException) { } // Invalid chat } 
+1
source

All Articles