How to connect the Live Instant Messenger with your XBox control

It has be awhile since I blogged. Thanks for coming back or joining this long trip into using Research. Now I have walked you through the process of taking an idea and moving it into a real project, we have not completed the process. I hope that you have downloaded the ECMAScript standard and took a look at it. Remember we are attempting to use the idea of creating a touch sensor that uses the Live Messenger API to connect with someone else. 

Is there products that are using this type of software, and the answer is yes. But if you are a software developer, and your companies needs to understand how to use this technology, this is the approach you would take to learn how to move ideas from R&D (Research and Development) into actual operation.

In the previous posting we looked at the Live Instant Messenger API and determined that these lines of code were the critical ones to use (there are other lines of code as well) to create using JavaScript or ECMAScript:

Use these links to while you are working on your project, whether it is a web page, game or enterprise (corporate) project:

· How To: Host the Sign-in Control

· How To: Monitor Presence

· How To: Change the User's Status

· How To: Add or Remove a Contact

· How To: Manage Conversations

· How To: Implement Presence Extensions

· How To: Implement Messaging Extensions

· How To: Access Messenger Resources

The code we are most interested in is the Microsoft.Live.Messenger.MessageType.nudgeMessage. The /* and the */ are a way to add comments to your code, single line comments use // (sometimes this is referred to as whack, whack). You could simply start copying the following code if you want to try this "snippet" of code, as it sits, it doesn't do anything, but you could try different things.:

/* Start Copying at this line

The recvMsg(sender, e) function is a function that is called by the incoming message

The “switch” statement is used to determine what type of message has come in

The “case” statements test the API objects that you called from the using

*/

function recvMsg(sender, e)

{

switch (e.get_message().get_type())

{

case Microsoft.Live.Messenger.MessageType.applicationMessage:

var message = e.get_message();

if (message.get_id() == _myApplicationMessage.Id) {

displayCustomMsg(message);

}

break;

case Microsoft.Live.Messenger.MessageType.nudgeMessage:

// Place your code here to use the nudgeMessage

break;

case Microsoft.Live.Messenger.MessageType.textMessage:

var message = e.get_message();

displayMsg(message);

default:

break;

}

}

//Finish copying here

You would place the Microsoft.Live.Messenger.MessageType.nudgeMessage in a case statement where you are building

Then to use the XBox control, we will need to move from the Live Messenger API to the Vista or Windows XP operating system. In one the near future blogs, I will cover how to use XNA and make your connection to this program.