Go语言跨平台GUI自动化系统,控制键盘、鼠标、位图和屏幕,操作窗口句柄以及全局事件监听;
支持Mac,Windows,andLinux(X11)系统;
用于自动化测试工具和远程控制以及自动化游戏等工具的编写;
简洁高效的跨平台工具自动化库
安装:
go get -ugithub.com/go-vgo/robotgo示例:
packagemainimport("fmt""github.com/go-vgo/robotgo")funcmain(){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")ifmleft==0{fmt.Println("youpress...","mouseleftbutton")}}
项目详情:
在线文档:https://github.com/go-vgo/robotgo/blob/master/docs/doc_zh.md项目主页:暂无,详见GithubGithub在线源码:https://github.com/go-vgo/robotgoOSC@GIT:https://gitee.com/veni0/robotgo
评论