1
1
# Robotgo
2
2
3
- ## !!! Warning: this page not updated !!!
3
+ # !!! Warning: this page not updated !!!
4
4
5
5
[ ![ Build Status] ( https://github.com/go-vgo/robotgo/workflows/Go/badge.svg )] ( https://github.com/go-vgo/robotgo/commits/master )
6
6
[ ![ CircleCI Status] ( https://circleci.com/gh/go-vgo/robotgo.svg?style=shield )] ( https://circleci.com/gh/go-vgo/robotgo )
@@ -20,6 +20,7 @@ RobotGo 支持 Mac, Windows, and Linux(X11).
20
20
提 Issues 请到 [ Github] ( https://github.com/go-vgo/robotgo ) , 便于统一管理和即时更新; ` REDAME_zh.md 已废弃, 不再更新 `
21
21
22
22
## Contents
23
+
23
24
- [ Docs] ( #docs )
24
25
- [ Binding] ( #binding )
25
26
- [ Requirements] ( #requirements )
@@ -34,6 +35,7 @@ RobotGo 支持 Mac, Windows, and Linux(X11).
34
35
- [ License] ( #license )
35
36
36
37
## Docs
38
+
37
39
- [ GoDoc] ( https://godoc.org/github.com/go-vgo/robotgo ) <br >
38
40
39
41
<!-- - [中文文档](https://github.com/go-vgo/robotgo/blob/master/docs/doc_zh.md) (弃用)
@@ -44,11 +46,13 @@ RobotGo 支持 Mac, Windows, and Linux(X11).
44
46
[ Robotn] ( https://github.com/vcaesar/robotn ) , binding JavaScript and other, support more language.
45
47
46
48
## Requirements:
49
+
47
50
环境要求:
48
51
49
52
在安装 RobotGo 之前, 请确保 ` Golang、GCC ` 被正确安装
50
53
51
54
### ALL:
55
+
52
56
```
53
57
Golang
54
58
57
61
58
62
#### For Mac OS X:
59
63
60
- Xcode Command Line Tools (And Privacy setting: [ #277 ] ( https://github.com/go-vgo/robotgo/issues/277 ) )
64
+ Xcode Command Line Tools (And Privacy setting: [ #277 ] ( https://github.com/go-vgo/robotgo/issues/277 ) )
61
65
62
66
```
63
67
xcode-select --install
64
68
```
65
69
66
70
#### For Windows:
67
71
68
- [ MinGW-w64] ( https://sourceforge.net/projects/mingw-w64/files ) (推荐使用)
72
+ [ MinGW-w64] ( https://sourceforge.net/projects/mingw-w64/files ) (推荐使用)
69
73
70
74
```
71
- Or the other GCC (But you should compile the "libpng" with yourself.
75
+ Or the other GCC (But you should compile the "libpng" with yourself.
72
76
Or you can removed the bitmap.go.)
73
77
```
74
78
75
79
#### For everything else (Linux 等其他系统):
76
80
77
81
```
78
- GCC,
82
+ GCC,
79
83
libpng(bitmap)
80
84
81
85
X11 with the XTest extension (also known as the Xtst library)
@@ -84,7 +88,7 @@ X11 with the XTest extension (also known as the Xtst library)
84
88
85
89
xcb, xkb, libxkbcommon
86
90
87
- Clipboard:
91
+ Clipboard:
88
92
89
93
xsel xclip
90
94
```
@@ -99,7 +103,6 @@ sudo apt install libx11-dev xorg-dev libxtst-dev libpng++-dev
99
103
sudo apt install xcb libxcb-xkb-dev x11-xkb-utils libx11-xcb-dev libxkbcommon-x11-dev libxkbcommon-dev
100
104
101
105
sudo apt install xsel xclip
102
-
103
106
```
104
107
105
108
##### Fedora:
@@ -113,6 +116,7 @@ sudo dnf install xsel xclip
113
116
```
114
117
115
118
## Installation:
119
+
116
120
With Go module support (Go 1.11+), just import:
117
121
118
122
``` go
@@ -128,14 +132,14 @@ go get github.com/go-vgo/robotgo
128
132
png.h: No such file or directory? Please see [ issues/47] ( https://github.com/go-vgo/robotgo/issues/47 ) .
129
133
130
134
## Update:
135
+
131
136
```
132
137
go get -u github.com/go-vgo/robotgo
133
138
```
134
139
135
140
注意 go1.10.x C 文件编译缓存问题, [ golang #24355 ] ( https://github.com/golang/go/issues/24355 ) .
136
141
` go mod vendor ` problem, [ golang #26366 ] ( https://github.com/golang/go/issues/26366 ) .
137
142
138
-
139
143
## [ Examples:] ( https://github.com/go-vgo/robotgo/blob/master/examples )
140
144
141
145
#### [ 鼠标] ( https://github.com/go-vgo/robotgo/blob/master/examples/mouse/main.go )
@@ -256,7 +260,7 @@ func main() {
256
260
bitmap := robotgo.CaptureScreen (10 , 20 , 30 , 40 )
257
261
// use `defer robotgo.FreeBitmap(bit)` to free the bitmap
258
262
defer robotgo.FreeBitmap (bitmap)
259
-
263
+
260
264
fmt.Println (" bitmap..." , bitmap)
261
265
img := robotgo.ToImage (bitmap)
262
266
robotgo.SavePng (img, " test_1.png" )
@@ -445,6 +449,7 @@ func main() {
445
449
## CrossCompiling
446
450
447
451
##### Windows64 to windows32
452
+
448
453
``` Go
449
454
SET CGO_ENABLED =1
450
455
SET GOARCH =386
@@ -454,6 +459,7 @@ go build main.go
454
459
#### Other to windows
455
460
456
461
Install Requirements (Ubuntu):
462
+
457
463
``` bash
458
464
sudo apt install gcc-multilib
459
465
sudo apt install gcc-mingw-w64
@@ -472,11 +478,13 @@ GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64
472
478
```
473
479
474
480
## Authors
475
- * [ The author is vz] ( https://github.com/vcaesar )
476
- * [ Maintainers] ( https://github.com/orgs/go-vgo/people )
477
- * [ Contributors] ( https://github.com/go-vgo/robotgo/graphs/contributors )
481
+
482
+ - [ The author is vz] ( https://github.com/vcaesar )
483
+ - [ Maintainers] ( https://github.com/orgs/go-vgo/people )
484
+ - [ Contributors] ( https://github.com/go-vgo/robotgo/graphs/contributors )
478
485
479
486
## Plans
487
+
480
488
- 更新 Find an image on screen, read pixels from an image
481
489
- 更新 Window Handle
482
490
- 尝试支持 Android, 也许支持 IOS
@@ -490,4 +498,4 @@ GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64
490
498
491
499
Robotgo is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.
492
500
493
- See [ LICENSE-APACHE] ( http://www.apache.org/licenses/LICENSE-2.0 ) , [ LICENSE-MIT] ( https://github.com/go-vgo/robotgo/blob/master/LICENSE ) .
501
+ See [ LICENSE-APACHE] ( http://www.apache.org/licenses/LICENSE-2.0 ) , [ LICENSE-MIT] ( https://github.com/go-vgo/robotgo/blob/master/LICENSE ) .
0 commit comments