This blog has moved to http://ThePowerShellGuy.com
Greetings /\/\o\/\/
after reading this blog Item,
Use IM to Ask Encarta i did think that would be cool to do in MSH.
I started with the library dotMSN, you can find here :
http://www.xihsolutions.net/dotmsn/I just downloaded the DLL imported it in MSH and got started :
[System.Reflection.Assembly]::LoadFile(
"g:\monad\dll\XihSolutions.DotMSN.dll")
$im = new XihSolutions.DotMSN.messenger
$im.Credentials.Account =
"User@hotmail.com"$im.Credentials.Password =
"Password"$im.Credentials.ClientID =
"msmsgs@msnmsgr.com"$im.Credentials.ClientCode =
"Q1P7W2E4J9R8U3S5"$im.connect()
$im.add_ConversationCreated({write-host
"Created"})
$con = $im.CreateConversation()
$con.invite(
encarta@conversagent.com)
the ClientID and Code are Fixed(imitating the real MSN client), I got them from the Example
easy enough till here ;-), and it get's all contacts for you already.
But I came to some problems with requesting a swithboard here.
http://www.xihsolutions.net/dotmsn/api/XihSolutions.DotMSN.NSMessageHandler.SwitchboardQueueItem.Initiator.htmlbut if you download the Full package, there is a working example.
So I started to test with that, then I got this answers from Encarta :
* Encarta® Instant Answers joined the conversationYou say: who is the pope ?Encarta® Instant Answers says: Which country or state would you like to know about?You say: who is the queen of the netherlands ?Encarta® Instant Answers says: I don't know about the Queen of the Netherlands, but I do know that the ruler of the Netherlands is German occupation.
Ok, as I never used MSN before and did only sign-up for this I keep it with that, and go to play some chess ;-)
but I still decided to post this as it already gets all the contact's, as MSH objects, for me that's only one so not very usefull , but if you use MSN a lot, maybe this alone is enough already ;-)
as you can use MSH filters on then etc.
MSH>$im.contactlist.All
MobileDevice : False
MobileAccess : False
HomePhone :
WorkPhone :
MobilePhone :
ClientCapacities :
0Mail : encarta@conversagent.com
Name : Encartar Instant Answers
Status : Offline
Online : False
NSMessageHandler : XihSolutions.DotMSN.NSMessageHandler
DisplayImage :
Emoticons : {}
ClientData :
ContactGroup : XihSolutions.DotMSN.ContactGroup
Blocked : False
OnBlockedList : False
OnForwardList : True
OnAllowedList : True
OnReverseList : False
so if you need to do some cleaning on your contacts in MSN, you can use MSH for this in this way.
and maybe someone is interested in finishing it in MSH, but as I don't use MSN for the rest, and encarta keeps on pointing me out to start the encarta application also, I decided to quit here for now.
but I hope this is still of use for someone more in to IM as I am, as the used library is pretty good, and is worth checking out I think.
gr /\/\o\/\/