/\/\o\/\/ PowerShelled

This blog has moved to http://ThePowerShellGuy.com Greetings /\/\o\/\/
$AtomFeed = ("Atom.xml")
$PreviousItems = (" Running (Un-block) a downloaded script in MSH "," Timing the loading of your profile in MSH "," Tuning MSH in your Profile "," Einstein 2 + subtopic. "," Burn MSH ?? "," Monad and Adam (and a preview of my to-be AD provi... "," Windows MineSweeper cheat "," erroraction on new-item, my Wrong use of Stringbui... "," MSH Minesweeper GUI game "," MSH get-WmiMethodHelp (GWM) Update + format tips. "," ")

Sunday, November 27, 2005

 


MSH MSN Instant messenger project (broken off)



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.html

but 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 conversation

You 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 : 0
Mail : 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\/\/


Comments: Post a Comment

Links to this post:

Create a Link



<< Home

Archives

October 2005   November 2005   December 2005   January 2006   February 2006   March 2006   April 2006   May 2006   June 2006   July 2006   August 2006   September 2006   October 2006   November 2006   December 2006  

$Links = ("PowerShell RC1 Docs"," PowerShell RC1 X86"," PowerShell RC1 X64"," Monad GettingStarted guide"," Monad Progamming Guide"," Monad SDK"," Monad videos on Channel 9"," MSH Community Workspace"," scripts.readify.net "," MonadSource"," www.reskit.net"," PowerShell Blog"," Under The Stairs"," computerperformance powershell Home"," proudlyserving"," MSH on wikipedia"," MSHWiki Channel 9"," Keith Hill's Blog"," Precision Computing"," PowerShell for fun"," MSH Memo (Japanese)"," monadblog")

find-blog -about "PowerShell","Monad" | out-Technorati.
find-blog -contains "","" | out-Technorati.
Google
 
Web mow001.blogspot.com

This page is powered by Blogger. Isn't yours?