Author Archive
Changing Yahoo Messenger’s status using C#
by edy_3dz on Aug.31, 2010, under Code snippets
Some people asked me how I change Yahoo Messenger’s status in my application called Emoticon Status Generator. So I’ll make public the code snippet that I used to accomplish this.
[DllImport("USER32.DLL", EntryPoint="FindWindowA",
CallingConvention=CallingConvention.StdCall)]
private static extern IntPtr FindWindow(string sClassName,
string sWindowName);
[DllImport("USER32.DLL", EntryPoint="PostMessageA",
CallingConvention=CallingConvention.StdCall)]
private static extern bool PostMessage(IntPtr hWnd, uint iMsg,
long wParam, long lParam);
void ChangeYahooStatus (string newStatus)
{
// Get the current signed in user
RegistryKey keyYahooPager =
Registry.CurrentUser.OpenSubKey("Software\\Yahoo\\Pager");
string userName = (string)keyYahooPager.GetValue ("Yahoo! User ID");
keyYahooPager.Close();
// Now open the current user's profile and set the new status message
// We have to pass true to OpenSubKey to request write access
RegistryKey keyYahooCustomMessages =
Registry.CurrentUser.OpenSubKey ("Software\\Yahoo\\Pager\\profiles\\"
+ userName + "\\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_W", newStatus);
keyYahooCustomMessages.Close ();
// We are done setting the value in the registry. We now need to notify
// Yahoo Messenger of this change
// Find the Messenger window and send it the notification
// 0x111: WM_COMMAND
// 0x188: Code 392
IntPtr hWndY = FindWindow ("YahooBuddyMain", null);
PostMessage (hWndY, 0x111, 0x188, 0);
}
It should work with Yahoo Messenger 9 and 10, not tested with other versions.
I hope that you’ll find useful this code snippet in developing some nice piece of software.
Nokia Qt SDK Setup – Online installer error
by edy_3dz on Aug.17, 2010, under QT
I started learning QT, and today I wanted to install Nokia Qt SDK, so I could build applications for my Symbian device. But I faced a little problem: the online installer was giving me the folowing error, over and over again:
Error during installation process:
The installer was not able to get the old path from \NokiaQtSDK\Symbian\SDK\bin\qmake.exe.(maybe it is broken or removed) It tried to patch the Qt binaries, but all other files in Qt are unpatched.
This could result in a broken Qt version.
Retry/Ignore/Cancel
Afer spending some time searchig what is the cause of this error, reading on the QT bug tracker that it is due to bad internet conectivity (not in my case
), I saw that someone suggested that this error appears beacause of the antivirus. So I disabled my antivirus, tried again, and this time worked like a charm.
So if you are having trouble installing Nokia Qt SDK using the online installer, disabling your antivirus will do the trick
Was this article helpful? Leave a comment below!
Emoticon Status Generator – Web Version
by edy_3dz on Aug.03, 2010, under Emoticon Status Generator
Finally I implemented the web version of Emoticon Status Generator. It’s still in an early form, so there will be lots of improvements in the near future. You can find it at this link.
And I want to say sorry for the lack of activity in the last few months, it was the most beautiful period of my life, I might say
But after so much fun, it is time to get back to work.
Cheers!
Emoticon Statuses request here!
by edy_3dz on Feb.21, 2010, under Emoticon Status Generator
I saw that people were making requests on various sites. So here I will complete requests made by anyone. Leave a comment with your request, and I’ll fill them as fast as possible.
Google Wave invitations giveaway
by edy_3dz on Feb.16, 2010, under Misc
I have a few Google Wave invitation to offer, so just send me your GMail address, and I’ll send you the invite. Don’t be shy. And quoting Doctor Wave: “Invitations will not be sent immediately. We have a lot of stamps to lick.”
