RobotJSGUI 自動(dòng)化工具
RobotJS 是一個(gè) Node.js 的 GUI 自動(dòng)化工具,可用來(lái)控制鼠標(biāo)、鍵盤和讀取屏幕。
目前自在 Mac + Node.js 0.10.31 下測(cè)試通過(guò)。
示例代碼:
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();評(píng)論
圖片
表情
