RobotJS - GUI 自动化工具


MIT
OS X
JavaScript

软件简介

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();