GUI 自动化工具 RobotJS
- 授权协议: MIT
- 开发语言: JavaScript
- 操作系统: OS X
- 软件首页: https://github.com/octalmage/robotjs
- 软件文档: https://github.com/octalmage/robotjs
软件介绍
RobotJS 是一个 Node.js 的 GUI 自动化工具,可用来控制鼠标、键盘和读取屏幕。
目前自在 Mac + Node.js 0.10.31 下测试通过。
示例代码:
var robot = require("robotjs");
//Get the mouse position, retuns an object with x and y.
var mouse=robot.getMousePos();
console.log("Mouse is at x:" + mouse.x + " y:" + mouse.y);
//Move the mouse down by 100 pixels.
robot.moveMouse(mouse.x,mouse.y+100);
//Left click!
robot.mouseClick();
