1 Star 0 Fork 8

魏大伟 / robotgo

forked from vz / robotgo 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 1.28 KB
一键复制 编辑 原始数据 按行查看 历史
veni0 提交于 2016-10-17 23:40 . base bitmap

#Robotgo

Golang Desktop Automation(robot). Control the mouse, keyboard, and read the screen.

RobotGo supports Mac, Windows, and Linux(X11).

This is a work in progress.

##API Document    中文文档 Please click API Document;This is a work in progress.

##Installation: go get github.com/go-vgo/robotgo

It's that easy!

###Requirements:

####ALL:
Golang //Gcc zlib & libpng (bitmap)

####For Mac OS X: Xcode Command Line Tools

brew install libpng
brew install homebrew/dupes/zlib

####For Windows: MinGW or other GCC ####For everything else: GCC

X11 with the XTest extension (also known as the Xtst library)

##Examples:

###Mouse

package main

import (
	//. "fmt"

	"github.com/go-vgo/robotgo"
)

func main() {
  robotgo.ScrollMouse(10, "up")
} 

###Keyboard

package main

import (
	//. "fmt"

	"github.com/go-vgo/robotgo"
)

func main() {
  robotgo.TypeString("Hello World")
  robotgo.KeyTap("enter")
  robotgo.TypeString("en")
} 

###Screen

package main

import (
	. "fmt"

	"github.com/go-vgo/robotgo"
)

func main() {
  x, y := robotgo.GetMousePos()
  Println("pos:", x, y)
} 
1
https://gitee.com/davidmr/robotgo.git
git@gitee.com:davidmr/robotgo.git
davidmr
robotgo
robotgo
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891