
Auto-Responder?? - Printable Version
-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Skype & Live Messenger (/forumdisplay.php?fid=10)
+----- Thread: Auto-Responder?? (/showthread.php?tid=77329)
Auto-Responder?? by taz0x on 09-08-2007 at 10:47 PM
Hi, I'm basically looking for an Auto Responder that sends automated messages when I am set to ONLINE (this is because i am totally against the idea of setting your status to Away, Busy, and other statuses, therefore I only use Online and Offline). Now I found two GREAT things, but unfortunately I forgot programming stuff and I have absolutely no idea how to compile these codes and stuff. Does anyone know a good Auto Responder that satisfies my needs? Or, can anyone help me edit one of these two add-ins??
Thank you
and by the way, here are the two things I found:
http://nayyeri.net/archive/2006/10/16/auto-respon...ive-messenger.aspx
http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=213
RE: Auto-Responder?? by taz0x on 09-09-2007 at 03:01 AM
Ok you know what, now I have a different problem, I got one of the Add-ins enabled in Windows Live Messenger, problem is it's not sending automated messages like it's supposed to, here is the code:
code: using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Messenger;
namespace AutoResponder
{
public class AutoResponder : IMessengerAddIn
{
#region Private members
MessengerClient client;
Dictionary<String, DateTime> history;
#endregion
#region IMessengerAddIn Members
public void Initialize(MessengerClient messenger)
{
this.client = messenger;
this.history = new Dictionary<String, DateTime>();
this.client.AddInProperties.FriendlyName =
"Auto-Responder";
this.client.AddInProperties.Creator =
"Keyvan Nayyeri";
this.client.AddInProperties.Description =
"Sends auto-respond texts to senders based on user status";
this.client.AddInProperties.Url =
new Uri("http://nayyeri.net");
this.client.IncomingTextMessage +=
new EventHandler<IncomingTextMessageEventArgs>
(client_IncomingTextMessage);
}
#endregion
#region Private methods
void client_IncomingTextMessage(object sender, IncomingTextMessageEventArgs e)
{
if (ShouldSend(e.UserFrom.UniqueId))
{
String outgoingText = String.Empty;
switch (this.client.LocalUser.Status)
{
case UserStatus.Away:
outgoingText +=
"I'm currently away from my computer and will respond to you later ";
break;
case UserStatus.BeRightBack:
outgoingText +=
"I'll be back very soon. Leave your messages here and I'll answer you when I get back to my computer ";
break;
case UserStatus.Busy:
outgoingText +=
"I'm currently busy or am viewing something in Full Screen mode. I'll respond to you when I get back to my computer ";
break;
case UserStatus.OnThePhone:
outgoingText +=
"I'm on the phone and will respond to you very soon ";
break;
case UserStatus.OutToLunch:
outgoingText +=
"I'm out to lunch. I'll repond to you after that ";
break;
}
if (!String.IsNullOrEmpty(outgoingText))
{
outgoingText = String.Format("Dear {0}, "
+ outgoingText, e.UserFrom.FriendlyName);
if (this.history.ContainsKey(e.UserFrom.UniqueId))
this.history[e.UserFrom.UniqueId] = DateTime.Now;
else
this.history.Add(e.UserFrom.UniqueId, DateTime.Now);
this.client.SendTextMessage(outgoingText, e.UserFrom);
}
}
}
private bool ShouldSend(String UserID)
{
if (this.history.ContainsKey(UserID))
if (DateTime.Now.Subtract(new TimeSpan(0, 5, 0))
< this.history[UserID])
return false;
return true;
}
#endregion
}
}
can anyone with C# knowledge help me on this? and I really don't know programming...
RE: Auto-Responder?? by MeEtc on 09-09-2007 at 03:03 AM
you might want to fix your links in the first post, so that people can view them
RE: Auto-Responder?? by taz0x on 09-09-2007 at 04:25 AM
oh, didn't notice that, fixed now, thank you for the notice.
RE: Auto-Responder?? by taz0x on 09-20-2007 at 04:18 AM
so, any ideas on why this won't work?
RE: Auto-Responder?? by taz0x on 09-30-2007 at 01:50 AM
alright now i got yet a NEW problem. the addin works I KNOW that now, but the problem now is that this addin only works for certain accounts. I have about 6 messenger accounts (and I have my reasons) and I tried this addin on all of them, it works for 4 of the accounts, but the other two doesn't send the auto response. what could these two accounts be doing to prevent the addin from functioning?
|