MSN API and Lazy Programming?

In my never ending quest to please Barry I've decided to post another blog, 2 in as many days.


A couple weeks ago I was reading Eli Robillard's blogs on Lazy Programming, simply happy that someone had blogged a topic I could relate to. As a side note, Eli's wife Marcie is an amazing person who would do anything to help a friend and colleague get what they need.... more on this later hopefully.

If you haven't read Eli's posts on Lazy Programming I strongly recommend it, and don't write it off just cause it has the word Lazy in it, you will regret it.
All this talk of laziness got me thinking of my own laziness. I decided that my own laziness is my greatest source of inspiration. The greatest of all the little programs and web apps I've created have been 'lazy' induced, apps to work for me, so I didn't have to.

The most current of the lazy projects is my MSN Assitant. I got tired of waiting for certain people to sign-on to MSN, but I hate being told about EVERY person that signs-in. So I created a little program that would pop-up some toast when the person I was looking for came online. Easy enough.
Only a few weeks later the next problem revealed itself. From the couch I could see that someone had written me, but I couldn't read who, or what was being said.
Now if you are an enthusiastic person you might be yelling at me to get off the couch, but I'm not like you. So the solution was clear, I needed to work in Microsoft Speech and the MSN API so that when a message is delivered it can be read to me. Depending on the message I can then decide for myself if I should get off the couch, I'm actually liberating myself from MSN.

MSN API - The MSN API for MSN 4 was an amazing bit of work, simple and easy to use. You could send and receive messages, look through your contacts, simply great.
The API for MSN 6, is simply put, horrible. I'm sure there were some excellent security reasons behind the changes to the API (better have been). Microsoft decided to remove the built in capability to send and receive messages. Unfortunetly MSN 6 has better functionality so you won't find many people using MSN 4. MSN 4 API will not work if the user has MSN 6 running.

So I can't easily receive messages, as a lazy person my first instinct is to quit, my cost/benefit analysis is thrown all out order, but the potential pay off is WAY to great.

So I stumbled upon MSN Fanatic which is a great resource site for the MSN API, they had some good suggestions. Basically involving using the WinAPI's to read from the textbox's the comprise a standard msn conversation window. This seemed plossable, but a pain, so I went the easy way, monitor the conversation history, strip out the new line, if it was spoken by someone otehr than me, speak it.

Microsoft Speach SDK - Another brilliant little peice of work, if you are looking for something nice and simple that will read some text, this is a dream. A couple of lines of code and your computer is reading to you in a selection of voices ( that pretty much all sound the same if you ask me )