Download latest version from Github

Resource to add mouse shortcuts to your .Net projects.
A simple mouse script.
The Mouse Commands project was another side-project from working on the Clipboard Cycler. While coding it, I decided to split up the Mouse features into an easy to use DLL file. Importing system dll’s, layouts, etc can be a painful process to research and implement. This DLL does it all for you.
To Use
Three simple steps.
- Reference MouseCommands.dll in your project.
- Create new instance of MouseCommands.
- Set Action MouseActionEventCall (Returns MouseActionEvent and MousePoint)
Setup Example:
// Enter the using statement. using MouseCommands; using System; namespace YourProgram { static class Program { [STAThread] static void Main() { // Call new MouseCommand. MouseCommand mouse = new MouseCommand(); // Setup Event Call (optional). mouse.MouseActionEventCall += OnMouseActionEventCall; // Do an action. mouse._MoveCursorPosition(new MousePoint(10, 10), 50); // Do another action. mouse._DoubleClick(); } private void OnMouseActionEventCall(MouseActionEvent result, MousePoint pos) { //do something on Mouse _Actions. } } }
Other Options:
//Returns a MousePoint type with X and Y locations of the mouse. mouse.SetHotkeysGlobally = true; //Default single left click at current mouse position. //Can set Left, Middle, or Right clicks with the Click count and mouse position. mouse._Click(); //Chaining commands is allowed. Mouse._Click()._Click(); //etc... //Default double left click at current mouse position. //Can set Left, Middle, or Right clicks and mouse position. mouse._DoubleClick(); //Specify a start position and end position with MousePoint types. Default click is Left. //Can set Left, Middle, or Right clicks and the speed to move the mouse. (Higher is faster, 50 = default, speed = 0 is instant). mouse._Drag(); //Specify a start position and end position with MousePoint types. //Can set the speed to move the mouse. (Higher is faster, 50 = default, speed = 0 is instant). mouse._MoveCursorPosition(); mouse.MouseActionEventCall is an event fired when a mouse event is fired from this resource. It returns the type of action using the MouseActionEvent type, and the final mouse position in the MousePoint type.
Please feel free to view the source code over at GitHub. Completely available. Let me know if you have any questions or concerns. And please share with your friends!