RobotGo原生 Golang 的跨平台自动化系统
Go 语言跨平台 GUI 自动化系统,控制键盘、鼠标、位图和屏幕,操作窗口句柄以及全局事件监听;
支持 Mac, Windows, and Linux (X11) 系统;
用于自动化测试工具和远程控制以及自动化游戏等工具的编写;
简洁高效的跨平台工具自动化库
安装:
go get -u github.com/go-vgo/robotgo
示例:
package main
import (
    "fmt"
    "github.com/go-vgo/robotgo"
)
func main() {
  robotgo.ScrollMouse(10, "up")
  robotgo.MouseClick("left",true)
  x, y := robotgo.GetMousePos()
  fmt.Println("pos:", x, y)
  robotgo.KeyTap("i", "alt", "command")
  arr := []string{"alt", "command"}
  robotgo.KeyTap("i", arr)
  mleft := robotgo.AddEvent("mleft")
  if mleft == 0 {
    fmt.Println("you press...", "mouse left button")
  }
} 
项目详情:
- 项目主页:暂无,详见Github
 
- Github在线源码:https://github.com/go-vgo/robotgo
 
- OSC@GIT:https://gitee.com/veni0/robotgo
 
评论
