node-win-mouse
为操作系统级别模拟. 并非硬件驱动
级别模拟
需要 64bit Winodws
Nodejs 6.0.0 +
方法 | 用途 |
---|---|
moveTo | 控制鼠标移动 |
leftDown | 左键按下 |
leftUp | 左键弹起 |
rightDown | 右键按下 |
rightUp | 右键弹起 |
const WinMouse = require('node-win-mouse');
WinMouse.moveTo(200,300);
WinMouse.leftDown();
WinMouse.leftUp();
WinMouse.rightDown();
WinMouse.rightUp();
console.log(WinMouse);