RobotGo原生 Golang 的跨平台自动化系统

联合创作 · 2023-09-30 21:20

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




 

浏览 35
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报