srikrishna_csse


Hello,

Can some one please let me know how to send an instant text message to a list of contacts from an external application. (say C# console/windows application)

The live messenger add-in apis do not allow sending a message out side the incoming/outgoing message event. This is possible in office communicator 2007 Apis. Please provide sample code if you have.

Thanks,

M.Srikrishna




Re: How to send an IM programmatically to more than one contact in live messenger

David_ES


hi.. look at this

http://forums.fanatic.net.nz/index.php showtopic=18503





Re: How to send an IM programmatically to more than one contact in live messenger

srikrishna_csse

Thank you for your quick response, David. The one you pointed out is a kind of reverse engineered one, while what I am looking for is official API of microsoft. On searching msdn, I see that windows messenger used to support COM interfaces. But they are deprecated and not supported any more on Vista. Do we have COM api support for live messenger

In case there is no other way to achieve the required functionality, please let me know If I can achieve this using any browser scripts, say javascript. (May be I can instantiate a webbrowser object and invoke the script).

I just need to send a pre-defined message to a list of contacts/email-ids. I need to ship this functionality in our product.

Thanks in advance,

M.Srikrishna






Re: How to send an IM programmatically to more than one contact in live messenger

David_ES

hi, It is true what you say...

You can do whatever you say using the following library.
http://forums.fanatic.net.nz/index.php showtopic=16989&start=0&p=102223&#entry102223
It's the official Api of Microsoft but it has been extracted from the .exe of windows messenger.

I have used and work properly in vista and c#

The problem is the method InstantMessage, only open conversation windows not allow message string but You can do this using sendkeys

Example:

using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
MSNMessengerAPI.Messenger msn = new MSNMessengerAPI.Messenger();
MSNMessengerAPI.IMSNMessengerContacts contacts = (MSNMessengerAPI.IMSNMessengerContacts)msn.MyContacts;
foreach (MSNMessengerAPI.IMSNMessengerContact contact in contacts)
{
msn.InstantMessage(contact);
//Example: Send Message using Sendkeys
}
}
}
}

I hope that the idea will serve





Re: How to send an IM programmatically to more than one contact in live messenger

srikrishna_csse

Thanks David for the sample. Unfortunately, we cannot use this extracted library. Any chance in the near future to have an official release of the above kind of type library





Re: How to send an IM programmatically to more than one contact in live messenger

David_ES

I think not, now only add-in api




Re: How to send an IM programmatically to more than one contact in live messenger

srikrishna_csse

Is there any way by which I can send the message to a list of emails without invoking conversation window I mean no UI window should pop-up, but the external application should be able send a message.