Rover, Fetch!

I was busy with some code and was trying to concentrate when I heard a noise from my computer that sounded like someone or something was scratching. My first impulse was to kill all the browser windows thinking that it must be some amateur website that had some flash ad running. Yet, 2-3 minutes later, something scratched yet again. And, there was this distinct feeling that this sound was quite familiar (no pun intended!)

At this point, I killed everything except my explorer windows. And, yet I could hear the scratching sound. And, that’s when it clicked. Mr. Rover – the ever friendly search assistant had completed the “fetch” and was waiting for me to do something with him again!

How can you not like the dog! Seeing Mr. Rover again, I was reminded of an IronPython talk that Mahesh Prakriya (from the DLR team) had conducted at MS IDC. One of his demos used to show how easy it was to invoke Merlin and make Merlin do some wizardry using IronPython.

Interest piqued, moments later, I had the latest build of IronPython downloaded and was ready to make Rover appear. But now, Rover was nowhere to be found.

I asked Rover to show me his hiding place and it turns out that he’s hiding in “%WINDIR%\srchasst\chars\rover.acs.”

Copied this file over to %WINDIR%\msagent\chars and I fired up notepad2 and with the following few lines, got Mr. Rover up on the screen.

Note that you need to run  C:\>tlbimp c:\WINDOWS\msagent\agentsvr.exe from visual studio command prompt.

#rover.py
#from visual studio command prompt, run C:\>tlbimp c:\WINDOWS\msagent\agentsvr.exe
import sys
import clr
from System.Runtime.InteropServices import DispatchWrapper, UnknownWrapper
sys.path.append('C:\\')
clr.AddReference("AgentServerObjects.dll")
from AgentServerObjects import AgentServerClass
a = AgentServerClass()
#c = clr.Reference[int]()
reqId = clr.Reference[int]()
cId = clr.Reference[int]()
c = clr.StrongBox[object](DispatchWrapper(None))
a.Load("rover.acs",cId,reqId)
#copy rover.acs from c:\WINDOWS\srchasst\chars\rover.acs to C:\WINDOWS\msagent\chars
a.GetCharacter(cId.Value,c)
c.Value.WrappedObject.Show(0,reqId)
c.Value.WrappedObject.Think("I fetch, therefore I am!", reqid)
c.Value.WrappedObject.Hide(0,reqId)

 

Neat fun! It felt sad to read that Rover has not been invited to Windows 7.

Technorati Tags: Windows Search Rover,IronPython


					

Sound Recorder

 

I get the laptop upgraded to 4GB and I assumed all my out of memory errors can be now stuff of the Dead Sea Scrolls.

I fire up an instance of sndrec32 and record 5 seconds of voice when I am greeted with this!

Out Of Memory Exception on a 4 GB system

Not enough memory available to complete this operation!

And, I have about 2 GB available as per task manager ;)

So, a basic search later, it is confirmed that I need to reduce my system RAM if I need to use Sound Recorder! Choices, choices!

India Holidays Calendar in Windows Live

 

I was pleasantly surprised to see Indian Holidays listed when I updated my Windows Live Mail to the latest version.

image

The calendars are available at India (Gujarati), India (Hindi), India (Kannada), India (Malayalam), India (Marathi), India (Tamil)

Get Windows Live here.