I know this topic has been covered before, but my question is somewhat different than those previous to mine.
In my project I want to read an analog value. I have this part down. I want the computer to move the mouse up when a certain threshold has been reached. I would also like for it to click for a certain thresh hold.
If anyone can direct me to a working library that would be great. Also the only board I have is the Mega 2560. so the leo's library will not work.
To do this you would want to write a program (on the PC) to listen for commands on the serial port from the Arduino and control the mouse. You would need to look into available libraries for this for whatever OS and whatever programming language you're using. The InterfacingWithSoftware page provides a large number of examples for various programming languages.
On the other hand, if you're just trying to build a sort of Arduino mouse then my answer stinks and you should follow HazardsMind's link. I'm assuming you still want to be able to communicate that analog reading to the PC.