Click here to Skip to main content
Click here to Skip to main content
Go to top

Set Your MSN Live Messenger to Auto Reply

, 26 Jan 2007
Rate this:
Please Sign up or sign in to vote.
What if one is getting angry when sending you IMs but not getting any Response. If he/she got patience , then you are safe. But there could be a punch for you on next DATE. Why spoil your DATE. Just go on installing this "AutoReplyAddIn".

Introduction

Customizing MSN Live Messenger to fullfill one's requirement is a great idea. Micosoft offer great Add-In feature to write the Add-Ins for your MSN Live Messenger. Writing an Add-in with Dot.Net Framework 2.0 is just a piece of Cake. So why dont try eating it. Tell me after eating that it was delicious.....ammm..

There are three steps to consider for watching your Add-In working.

  1. Enabling Live Messenger to accept Add-Ins
  2. Writing your Add-In
  3. Registering Add-In with Messenger

Enabling Live Messenger to Accept Add-Ins

hey dont worry, this is also an easy step.

Just follow the instructions

Run your Registry Editor

Start--> Run--> Regedit

Scroll to following Registry KeyHKEY_CURRENT_USER\Software\Microsoft\MSNMessenger

create a new DWORD entry AddInFeatureEnabled, if it is not there. then set its value to 1.

Now restart your Messenger

Writing Add-In

Create a new C# or whatever .Net language you like.

File--> New--> Project-->Class Library

Now Add Reference to MessengerClient.dll

Right Click on your Solution Name-->Add Refrence

Browse for MessengerClient.dll (most probably at C:\Program Files\MSN Messenger )

Now to avoid fully qualified names of types that we are going to use , you should add

using

The next step is to go on writing a class named AddIn(You can choose whatever name you like). But mind one thing that this class should me implementing an Interface

{

User userFrom = e.UserFrom;

Client.SendNudgeMessage(userFrom);

Client.SendTextMessage(

}

"Hey, I m busy. Please leave your message ", userFrom);

Now just build or compile your solution. This will create a dll called your_namespace_name.dll in bin folder of your application. Just browse to that folder and rename that dll. to

your_namespace_name.yourClassName.dll

Now your done with all the Code effort.

Registering your Add-In to Live Messenger

Open up your Live Messenger

Tools--> Options, Your will have an Add-In option click it and browse to your dll created in above steps.

Run Messenger and get your Add-In working.

NOTE: This Article just gives an idea about working with Add-Ins for Windows Live Messenger. A thorough understanding of of Windows Live Messenger Add-In API can be found at http://msdn2.microsoft.com/en-us/library/aa905655.aspx

Here is the complete listing of Code

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Messenger;


namespace

AutoReplyAddIn
{public class AddIn:IMessengerAddIn
{private MessengerClient client = null;public void Initialize(MessengerClient messenger)
{ // Initialize your Add-in hereClient = messenger;// Set Add-in properties here//////////////////////////////////////////////////Client.AddInProperties.Creator = "Shehzad Ahmed"; Client.AddInProperties.Description = "An Add-in to send Auto Replies"; Client.AddInProperties.FriendlyName = "Auto Reply Add-In"; Client.AddInProperties.PersonalStatusMessage = "Auto Reply Add-in Activated";Client.AddInProperties.Status = UserStatus.Online; // Register Handler for Incoming Text MessagesClient.IncomingTextMessage+=new ventHandler<IncomingTextMessageEventArgs> (Client_IncomingTextMessage);
}public void Client_IncomingTextMessage(Object Sender, IncomingTextMessageEventArgs e)
{User userFrom = e.UserFrom;Client.SendNudgeMessage(userFrom);
Client.SendTextMessage("Hey, I m busy. Please leave your message ", userFrom);
}public MessengerClient Client
{get{ return client; }private set{
client = value;
}
}
}
}

IMessengerAddIn

public class AddIn:IMessengerAddIn

IMessengerAddIn offers Initialize Method that must be implemented.

public

Since we are aiming to send only an Auto Reply, we just need register with the

IncomingTextMessage event as new EventHandler<IncomingTextMessageEventArgs>(Client_IncomingTextMessage);

Client.IncomingTextMessage+=

Now just go on writing Event Handler

public

void Client_IncomingTextMessage(Object Sender, IncomingTextMessageEventArgs e) void Initialize(MessengerClient messenger){} Microsoft.Messenger

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Sheez08
Web Developer
Pakistan Pakistan
Shehzad Ahmed, Software Developer, Domains C#, VB.NET and ASP.Net

Comments and Discussions

 
Generaladult content filter. - protecting my kids PinmemberZUPERKOOL7-Feb-10 5:01 
GeneralMessenger 9 PinmemberBasel Nimer16-Apr-09 4:25 
QuestionStatusChangedEvent PinmemberplextoR5-Jul-07 8:15 
Questionwhat about C++? PinmemberAmro Fawzy21-Feb-07 4:02 
GeneralThis is not C++... Pinmvptoxcct20-Feb-07 8:55 
GeneralNice Article PinmemberCkesri10-Feb-07 12:13 
GeneralDownload breaks... PinmemberDandy Cheung29-Jan-07 15:19 
GeneralRe: Download breaks... Pinmembersheez0830-Jan-07 18:15 
GeneralGreat article PinmemberBradml26-Jan-07 20:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 27 Jan 2007
Article Copyright 2007 by Sheez08
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid