Blog Stats
  • Posts - 6
  • Articles - 0
  • Comments - 8
  • Trackbacks - 17

 

Thursday, October 13, 2005

Programmatically changing MSN Messenger's status

Here's how you can do it. http://forums.msnfanatic.com/index.php?showtopic=11226

Tuesday, October 11, 2005

Programmatically changing Yahoo Messenger's status

Alright, I'd been looking for this stuff for a while. I couldn't find any useful resources on the internet so thought of giving it a try to find out how its actually done. Thought people like me would be interested in knowing.

Seems like we need to setup a custom message in registry and notify yahoo of this change we've made. We need to set the “HKCU\Software\Yahoo\Pager\Profiles\[current user]\Custom Msgs\5” to our new status message and send WM_COMMAND message with wParam set to 392 (write me a mail if you need to know how I figured this out) to the yahoo messenger's main window(see the code snippet below to see how current user is retrieved).

Here is how you can do it in C#(I guess you can figure out the PInvoke declarations)

private void ChangeYahooStatus (string newStatus)

{

// Get the current signed in user

//

RegistryKey keyYahooPager = Registry.CurrentUser.OpenSubKey ("Software\\Yahoo\\Pager");

string sUserName = (string)keyYahooPager.GetValue ("Yahoo! User ID");

keyYahooPager.Close();

System.Diagnostics.Debug.WriteLine ("The currently logged in user is " + sUserName);

 

// Now open the current user's profile and set the current status message, pass true to

// OpenSubKey to request write access

RegistryKey keyYahooCustomMessages = Registry.CurrentUser.OpenSubKey ("Software\\Yahoo\\Pager\\profiles\\"

+ sUserName + "\\Custom Msgs", true);

 

// Set the 5th message, seems like yahoo messenger has the functionality to move the newly set

// message up as the first one.

keyYahooCustomMessages.SetValue ("5", newStatus);

keyYahooCustomMessages.Close ();

 

// We are done setting the value in the registry. We now need to notify y! of this change

//

 

// Find the yahoo messenger window and sent it the notification

// 0x111: WM_COMMAND

// 0x188: Code 392

IntPtr hWndY = FindWindow ("YahooBuddyMain", null);

System.Diagnostics.Debug.WriteLine ("Find window got: " + hWndY.ToString());

PostMessage (hWndY, 0x111, 0x188, 0);

}

 

Tuesday, July 05, 2005

OpenGL shaders in software

I had been desperately looking for some software emulation for ARB Vertex/Fragment programs in OpenGL for a past few days.

I have a pretty shitty display chip on my notebook, ATI 345 IGP. Well, not all that shitty though, it does support vs 1.1 in hardware. However, the OpenGL driver that I presently have doesn't export a vertex program extension (is it expected to?).

So, in search for vertex/fragment programs software emulation, I found MESA. I had previously ignored MESA as software emulation stuff for OpenGL(who needs it anyways, I have real hardware!), but now it bounced back again into my head. The current version 6.2.1 supports ARB_vertex_program and ARB_fragment_program. I ran a test application with it yesterday and it seemed to be running great (I just ran a vertex program, not sure about fragment programs yet). I'll be looking forward to MESA coming out with ARB_vertex_program_100. I would then be able to try out some GLSL with it, but well, Cg is working fine for me at the moment and I hope to have a better machine sometime soon.

Monday, June 27, 2005

Batman Begins

Went for Batman Begins last night. Amazing movie! Very different from the earlier ones. Well placed, well directed, well executed.

Must watch!

Sunday, June 26, 2005

Fried Hardisk

Just recently I got my notebook's harddisk fried. I don't know what happened to it. Just suddenly stopped working. I had already applied for an extended warranty on my notebook so I got it replaced all for free. HP returned my notebook with an all new bios and cleaned the screen for me, which I always find a pain. It feels so new to me now. I am in love again.

Had been downloading software for past two days now. I have the MSDN download subscription, so starting from Windows XP to Visual Studio.NET to MS Office all downloaded in a couple of days. But this time I am burning the software to disks; don't want to do this again in case something else gets fried. I have my fingers crossed though.

Thursday, June 23, 2005

Blender3D

Seems like a pretty cool tool. Lightweigth(4.78MB) and feature-packed, this tools can really let you create some amazing models and scenes. Check www.blender.org. GameDev.net has recently come up with “Using Blender to Make Game Models “ series of tutorials which seem to be very descriptive and with a lot of screenshots :). You can, however, order the entire tutorial guide for 39 Euros from blender itself.

Another tool I like playing around with is gmax. The younger brother of 3DMax, this tool is aimed at game developers. I haven't been able to look to deep into it, but I believe I would be more comfortable using it since I have a bit of experience with 3DMax.

Do check these tools out.

 

 

Copyright © Uday K Verma