Savie,
Feel free to use all or parts of the code I did
here.
It is a hack that another author on this site first published to get dynamic harvesting skill data from the skills window. I took that and built a stand-alone harvesting tool with lots of features, but the basics are easy to follow and pull out.
I have lots of other hacks I use, that you are also welcome to. Just let me know if you want to look at them, I will email them to you.