node_mouse
v0.0.1
Published
Windows NT Mouse Control Library
Downloads
3
Readme
node_mouse
Windows NT Mouse Control Library for Node.js.
API
var mouse = require('node_mouse');
mouse.move(100, 100);
mouse.moveTo(100, 100);
mouse.click(mouse.Mouse_Left);
mouse.click(mouse.Mouse_Middle);
mouse.click(mouse.Mouse_Right);
mouse.press(mouse.Mouse_Right);
mouse.release(mouse.Mouse_Right);
mouse.wheelUp();
mouse.wheelDown();
var currentPosition = mouse.getCurrentPosition();
console.log(JSON.stringify(currentPosition,null,2));
mouse.smoothMove(100, 100, 800, function () {
console.log("This is callback.");
}); // smoothly move mouse (100,100). duration : 800ms
mouse.smoothMoveTo(100,100,800,function() {
console.log("This is callback.");
});
// arguments : (srcX, srcY, desX, desY, duration, [callback])
mouse.smoothMoveFromTo(100,100,400,400,800,function() {
console.log("This is callback");
});