Day 17 - WPM Tray
Tonights application is a Words Per Minute meter in your systray. The algorithm used to determine a word is VERY simple (a space, tab, or return separated by anything else).
It's a green box for 0-99wpm, a gold box for 100-199wpm, and a red box for 200-299wpm. For 300+ it turns all white. No one types THAT fast, do they? The colors were used to avoid handling 3 characters in that tiny icon.
At the last minute, I added a history graph. It records the last 15 mins of typing on a graph. Double click the icon to see it, double click the graph to hide it. The graph IS resizeable even though the resize handles don't show. I didn't have time to play with the cursor, and I implemented a custom padding for resize because .NET's form borders are just plain ugly.
This is easily going to become one of my favorites so far! Source code has a great example of overriding the onPaint method of a custom control to paint a graph. That control was just written by me - NOT ripped from anywhere else ;).
Download the app here
Download the source here
May the source be with you.
22 Comments:
awesome! you're great!
Doesn't seem to run for me. Fails to initialize properly... Perhaps I am missing something...
This is useless if your measure of WPM doesn't follow any commonly accepted standards (which it doesn't).
Try this:
http://en.wikipedia.org/wiki/Wpm
Checking this out. The example code from these projects is very useful!
Hello! I can't believe how cool your projects have been (i've only read the descriptions - i haven't tried any yet, though). I was wondering (probably a dumb question) whether the apps are for linux, mac osx, or windows. I've looked all around the site for the info but I can't find it (which is what makes me think that I should know). Thank you!! :)
After seeing this, I came up with an idea for your next app! How about a click counter! My co-workers always tell me I am extremely click happy and click to much, perhaps it can generate the amount of clicks per minute, per day, per month, per year..etc. Perhaps keep a tally of total clicks and even compete your clicks with other peoples click's around the world to see who clicks most on a daily bases! What do you think?
Even better, how about combining WPM tray, CPM(Clicks per Minute) tray, and MDT (Mouse Distance Traveled) Tray, all in one app! That would be freaking awesome! :-) I Would use it all the time.
It won't launch for me either :(
XP Pro, just installed the latest .NET Framework.
Whoever said they wanted a click counter, check out WhatPulse.org. It counts keystrokes, clicks, and mouse distance travelled. You can then upload these statistics to the site, which will tell you where you rank compared to other people.
Just got the first crash from an AAD program - illegal operation, I copied the error codes but it didnt let me paste them - next time I guess.
Fun program though!
(it was in the graphic update something or other)
It wont load for me either, says something about .NET framework.
Anon - you need the dotnet installed for the programs to run. My error was a crash, happened sometime during the screen saver.
Yea, I got an error too after it was running for several hours. I didn't get a chance to look at it real close but a very cursory look seemed to indicate some kind of resource leakage.
Yeah - your aps are great, but having to install .NET stuff is a real turnoff...
Ever thought about creating this program as a sidebar gadget for Vista? I really like the idea of it and I think it would go great in the sidebar.
Looks like it doesn't like coming back from screen savers. Mine crashes consistently when I let my screen lock and return.
.NET framework download page :)
http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&displaylang=en
very nice blog.
I like some of apps here.
keep up the great job.
Sid
http://4techies.blogspot.com
Hey nice blog and nice app. Check another word counter app> http://www.wordcountertool.com/
This comment has been removed by the author.
For those getting errors, it's due to a memory leak.
To fix, add this using statement:
using System.Runtime.InteropServices;
Add this to the list of declared variables:
private static IntPtr hIcon;
Add the following code in the class:
[DllImport("user32.dll", EntryPoint = "DestroyIcon")] static extern bool DestroyIcon(IntPtr hIcon);
And then change this line:
_icon.Icon = Icon.FromHandle(_bmp.GetHicon());
to these three lines:
DestroyIcon(hIcon);
IntPtr hIcon = _bmp.GetHicon();
_icon.Icon = Icon.FromHandle(hIcon);
This fixes the memory leak.
To the commenter who says this is inaccurate, well duh.
But it's a nice ball park figure.
Post a Comment
<< Home