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();
网站地址 : http://robotjs.io
GitHub: https://github.com/octalmage/robotjs
网站描述: Node.js 桌面 自动 化
RobotJs官方网站
官方网站: http://robotjs.io
如果觉得 网站内容还不错,欢迎将 网站 推荐给程序员好友。
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did177429