bot using dotmsn

  • Thread starter Thread starter Devang
  • Start date Start date
D

Devang

Hi

i am developing a bot using dotmsn

the following is a snippet of code from the C# windows app.

This piece of code sends a message in response to the user starting the
conversation & sending the message. The code after that creates a new
conversation with that user & sends another message.

private void Switchboard_TextMessageReceived(object sender,
TextMessageEventArgs e)
{

// creating a new text message
TextMessage message = new TextMessage("testing");

// sending the message over this switchboard
Conversation.Switchboard.SendTextMessage(message);

// inviting the same user to a new conversation
con_user.Invite(the_one);

// creating a new text message for the next conversation
TextMessage in_mess = new TextMessage("testing 2");

MessageBox.Show("new conversation");

// sending the message in_mess over the second conversation
con_user.Switchboard.SendTextMessage(in_mess);

}


That was the piece of code that is written to be executed whenver the
Conversation.Switchboard.TextMessageReceived event is fired

Now the problem is the last statement in the code i.e
con_user.Switchboard.SendTextMessage(in_mess); doesn't show the new
conversation if I comment out the MessageBox.Show("new conversation");
statement. however if works perfectly fine if it is not commented.
This being a bot I cannot have this MessageBox statement. Please advise
what I can do.

thanks
 
Devang,
I'm not sure a lot of people even know what dotmsn is. I do, because I used
it to send msn messenger notifications with a windows service that monitors
websites being up or down. As I recall, it has an event-driven model and this
may be part of your issue.
Make sure you look over the sample code and that you have event handlers
rigged up for each event that can be triggered.
Hope this helps,
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top