Format README.md and docs markdown

This commit is contained in:
vcaesar 2019-01-08 20:11:01 -04:00
parent 638117ac64
commit 5e6c44832f
4 changed files with 81 additions and 81 deletions

View File

@ -13,9 +13,9 @@
[![Join the chat at https://gitter.im/go-vgo/robotgo](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/go-vgo/robotgo?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
<!-- [![Release](https://github-release-version.herokuapp.com/github/go-vgo/robotgo/release.svg?style=flat)](https://github.com/go-vgo/robotgo/releases/latest) -->
<!-- <a href="https://github.com/go-vgo/robotgo/releases"><img src="https://img.shields.io/badge/%20version%20-%206.0.0%20-blue.svg?style=flat-square" alt="Releases"></a> -->
>Golang Desktop Automation. Control the mouse, keyboard, bitmap, read the screen, Window Handle and global event listener.
RobotGo supports Mac, Windows, and Linux(X11).
[简体中文](https://github.com/go-vgo/robotgo/blob/master/README_zh.md)
@ -42,8 +42,8 @@ RobotGo supports Mac, Windows, and Linux(X11).
Now, Please make sure `Golang, GCC` is installed correctly before installing RobotGo.
### ALL:
```
### ALL:
```
Golang
GCC
@ -52,7 +52,7 @@ GCC
#### For Mac OS X:
```
Xcode Command Line Tools
```
```
#### For Windows:
```
@ -63,20 +63,20 @@ MinGW-w64 (Use recommended) or other GCC
```
GCC, libpng
X11 with the XTest extension (also known as the Xtst library)
Event:
xcb, xkb, libxkbcommon
```
```
##### Ubuntu:
```yml
sudo apt-get install gcc libc6-dev
sudo apt-get install libx11-dev xorg-dev libxtst-dev libpng++-dev
sudo apt-get install libx11-dev xorg-dev libxtst-dev libpng++-dev
sudo apt-get install xcb libxcb-xkb-dev x11-xkb-utils libx11-xcb-dev libxkbcommon-x11-dev
sudo apt-get install libxkbcommon-dev
@ -104,10 +104,10 @@ png.h: No such file or directory? Please see [issues/47](https://github.com/go-v
## Update:
```
go get -u github.com/go-vgo/robotgo
go get -u github.com/go-vgo/robotgo
```
Note go1.10.x C file compilation cache problem, [golang #24355](https://github.com/golang/go/issues/24355).
Note go1.10.x C file compilation cache problem, [golang #24355](https://github.com/golang/go/issues/24355).
`go mod vendor` problem, [golang #26366](https://github.com/golang/go/issues/26366).
@ -126,8 +126,8 @@ func main() {
robotgo.ScrollMouse(10, "up")
robotgo.MouseClick("left", true)
robotgo.MoveMouseSmooth(100, 200, 1.0, 100.0)
}
```
}
```
#### [Keyboard](https://github.com/go-vgo/robotgo/blob/master/examples/key/main.go)
@ -144,10 +144,10 @@ func main() {
robotgo.TypeString("Hello World")
robotgo.TypeString("测试")
robotgo.TypeStr("测试")
robotgo.TypeStr("山达尔星新星军团, galaxy. こんにちは世界.")
robotgo.Sleep(1)
ustr := uint32(robotgo.CharCodeAt("测试", 0))
robotgo.UnicodeType(ustr)
@ -162,7 +162,7 @@ func main() {
if err == nil {
fmt.Println(text)
}
}
}
```
#### [Screen](https://github.com/go-vgo/robotgo/blob/master/examples/screen/main.go)
@ -181,7 +181,7 @@ func main() {
fmt.Println("pos: ", x, y)
color := robotgo.GetPixelColor(100, 200)
fmt.Println("color---- ", color)
}
}
```
#### [Bitmap](https://github.com/go-vgo/robotgo/blob/master/examples/bitmap/main.go)
@ -206,7 +206,7 @@ func main() {
fmt.Println("FindBitmap------ ", fx, fy)
robotgo.SaveBitmap(bitmap, "test.png")
}
}
```
#### [Event](https://github.com/go-vgo/robotgo/blob/master/examples/event/main.go)
@ -230,7 +230,7 @@ func main() {
if mleft == 0 {
fmt.Println("you press... ", "mouse left button")
}
}
}
```
#### [Window](https://github.com/go-vgo/robotgo/blob/master/examples/window/main.go)
@ -272,7 +272,7 @@ func main() {
title := robotgo.GetTitle()
fmt.Println("title@@@ ", title)
}
}
```
## CrossCompiling
@ -289,7 +289,7 @@ go build main.go
GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ go build -x ./
```
```
// CC=mingw-w64\x86_64-7.2.0-win32-seh-rt_v5-rev1\mingw64\bin\gcc.exe
// CC=mingw-w64\x86_64-7.2.0-win32-seh-rt_v5-rev1\mingw64\bin\gcc.exe
// CXX=mingw-w64\x86_64-7.2.0-win32-seh-rt_v5-rev1\mingw64\bin\g++.exe
```

View File

@ -7,9 +7,9 @@
[![GoDoc](https://godoc.org/github.com/go-vgo/robotgo?status.svg)](https://godoc.org/github.com/go-vgo/robotgo)
[![GitHub release](https://img.shields.io/github/release/go-vgo/robotgo.svg)](https://github.com/go-vgo/robotgo/releases/latest)
[![Join the chat at https://gitter.im/go-vgo/robotgo](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/go-vgo/robotgo?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
>Golang 跨平台自动化系统,控制键盘鼠标位图和读取屏幕,窗口句柄以及全局事件监听
RobotGo 支持 Mac, Windows, and Linux(X11).
提 Issues 请到 [Github](https://github.com/go-vgo/robotgo), 便于统一管理和即时更新
@ -32,14 +32,14 @@ QQ 群: 595877611
## Docs
- [GoDoc](https://godoc.org/github.com/go-vgo/robotgo)
- [中文文档](https://github.com/go-vgo/robotgo/blob/master/docs/doc_zh.md)&nbsp;&nbsp;&nbsp;
- [English Docs](https://github.com/go-vgo/robotgo/blob/master/docs/doc.md)
- [English Docs](https://github.com/go-vgo/robotgo/blob/master/docs/doc.md)
## Requirements:
环境要求:
在安装 RobotGo 之前, 请确保 `Golang、GCC` 被正确安装
### ALL:
### ALL:
```
Golang
@ -49,7 +49,7 @@ GCC
#### For Mac OS X:
```
Xcode Command Line Tools
```
```
#### For Windows:
```
@ -60,11 +60,11 @@ MinGW-w64 (推荐使用) or other GCC
```
GCC, libpng
X11 with the XTest extension (also known as the Xtst library)
事件:
xcb, xkb, libxkbcommon
```
@ -73,7 +73,7 @@ xcb, xkb, libxkbcommon
```yml
sudo apt-get install gcc libc6-dev
sudo apt-get install libx11-dev xorg-dev libxtst-dev libpng++-dev
sudo apt-get install libx11-dev xorg-dev libxtst-dev libpng++-dev
sudo apt-get install xcb libxcb-xkb-dev x11-xkb-utils libx11-xcb-dev libxkbcommon-x11-dev
sudo apt-get install libxkbcommon-dev
@ -98,11 +98,11 @@ go get github.com/go-vgo/robotgo
```
It's that easy!
png.h: No such file or directory? Please see [issues/47](https://github.com/go-vgo/robotgo/issues/47).
png.h: No such file or directory? Please see [issues/47](https://github.com/go-vgo/robotgo/issues/47).
## Update:
```
go get -u github.com/go-vgo/robotgo
go get -u github.com/go-vgo/robotgo
```
注意 go1.10.x C 文件编译缓存问题, [golang #24355](https://github.com/golang/go/issues/24355).
@ -124,16 +124,16 @@ func main() {
robotgo.ScrollMouse(10, "up")
robotgo.MouseClick("left", true)
robotgo.MoveMouseSmooth(100, 200, 1.0, 100.0)
}
```
}
```
#### [键盘](https://github.com/go-vgo/robotgo/blob/master/examples/key/main.go)
```Go
package main
import (
"fmt"
import (
"fmt"
"github.com/go-vgo/robotgo"
)
@ -142,10 +142,10 @@ func main() {
robotgo.TypeString("Hello World")
robotgo.TypeString("测试")
robotgo.TypeStr("测试")
robotgo.TypeStr("山达尔星新星军团, galaxy. こんにちは世界.")
robotgo.Sleep(1)
ustr := uint32(robotgo.CharCodeAt("测试", 0))
robotgo.UnicodeType(ustr)
@ -160,7 +160,7 @@ func main() {
if err == nil {
fmt.Println(text)
}
}
}
```
#### [屏幕](https://github.com/go-vgo/robotgo/blob/master/examples/screen/main.go)
@ -179,7 +179,7 @@ func main() {
fmt.Println("pos: ", x, y)
color := robotgo.GetPixelColor(100, 200)
fmt.Println("color----", color)
}
}
```
#### [位图](https://github.com/go-vgo/robotgo/blob/master/examples/bitmap/main.go)
@ -203,7 +203,7 @@ func main() {
fmt.Println("FindBitmap------", fx, fy)
robotgo.SaveBitmap(bitmap, "test.png")
}
}
```
#### [事件](https://github.com/go-vgo/robotgo/blob/master/examples/event/main.go)
@ -227,7 +227,7 @@ func main() {
if mleft == 0 {
fmt.Println("you press... ", "mouse left button")
}
}
}
```
#### [窗口句柄](https://github.com/go-vgo/robotgo/blob/master/examples/window/main.go)
@ -269,7 +269,7 @@ func main() {
title := robotgo.GetTitle()
fmt.Println("title@@@ ", title)
}
}
```
## CrossCompiling
@ -286,7 +286,7 @@ go build main.go
GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ go build -x ./
```
```
// CC=mingw-w64\x86_64-7.2.0-win32-seh-rt_v5-rev1\mingw64\bin\gcc.exe
// CC=mingw-w64\x86_64-7.2.0-win32-seh-rt_v5-rev1\mingw64\bin\gcc.exe
// CXX=mingw-w64\x86_64-7.2.0-win32-seh-rt_v5-rev1\mingw64\bin\g++.exe
```

View File

@ -6,7 +6,7 @@
# Caloris Montes
### Add
### Add
- [NEW] Update keyboard use sendInput not keybd_event
- [NEW] Update mouse use sendInput not mouse_event
@ -28,7 +28,7 @@
- [NEW] Add color picker and getMousePos() example
- [NEW] Use go mod not dep, add go.mod remove dep files
- [NEW] Add GetColors func return string
- [NEW] Optimize defer code
- [NEW] Optimize defer code
<br/>
- [NEW] Add more godoc
@ -74,7 +74,7 @@ See Commits for more details, after Otc 8.
## RobotGo v0.60.0, Mount Olympus: Mytikas
### Add
### Add
- [NEW] Add GetBounds func support (add get_client and get_frame C_func)
- [NEW] Add GetXId and GetXidFromPid func
@ -115,7 +115,7 @@ See Commits for more details, after Otc 8.
<br/>
- [NEW] Update code style and move scale to win_sys.h
- [NEW] Update example add more lang
- [NEW] Update example add more lang
- [NEW] Update pkg to newest
- [NEW] Remove duplicate code and old useless code
- [NEW] Update and clean README.md
@ -135,7 +135,7 @@ See Commits for more details, after Aug 8.
## RobotGo v0.50.0, The Appalachian Mountains
## Add
## Add
- [NEW] Add simple ocr support
- [NEW] Add max and min window api and win32.h file
@ -147,7 +147,7 @@ See Commits for more details, after Aug 8.
- [NEW] Add GetForegroundWindow and FindWindow func support
- [NEW] Add bitmap to CBitmap func, Add ToCBitmap example to examples
- [NEW] Add get Scale and GetScaleSize func, get primary display DPI scale factor fix #129, #135
Add Custom DPI Scaling support,
Add Custom DPI Scaling support,
Add scale default value,
Add scale example
@ -194,7 +194,7 @@ See Commits for more details, after Apr 30.
## RobotGo v0.49.0, Olympus Mons
### Add
### Add
- [NEW] Add get image size func
- [NEW] Add linux type string utf-8 support
@ -237,7 +237,7 @@ See Commits for more details, after Jan 25.
## RobotGo v0.48.0, Ben Nevis
### Add
### Add
- [NEW] Add active window by name func ActiveName
- [NEW] Add type string utf-8 support
@ -272,7 +272,7 @@ Add func ToMMRGBHex, U32ToHex, U8ToHex, PadHex, HexToRgb, RgbToHex and examples
- [NEW] Update godoc
- [NEW] Update CHANGELOG.md
- [NEW] Change TostringBitmap return string
- [NEW] Update C language code and other naming
- [NEW] Update C language code and other naming
- [NEW] Update code and code style
- [NEW] Update move mouse smooth
@ -280,7 +280,7 @@ Add func ToMMRGBHex, U32ToHex, U8ToHex, PadHex, HexToRgb, RgbToHex and examples
### Fix
- [FIX] Fix mac set active and active by pid
- [FIX] Fix windows active by pid #101
- [FIX] Fix windows active by pid #101
- [FIX] Fix FindColor param tolerance
- [FIX] Fix find bitmap float args
- [FIX] Fix some range error
@ -291,7 +291,7 @@ See Commits for more details, after Dec 13.
## RobotGo v0.47.0, Mount Cook
### Add
### Add
- [NEW] Add windows 32bit and 64bit dependency
- [NEW] Add macOs dependency
@ -303,7 +303,7 @@ Solve the problem of dependence, remove zlib/libpng dependencies
- [NEW] Add kill the process
- [NEW] Add public event and update code
- [NEW] Add Windows 32bit and 64bit Appveyor CI
### Update
- [NEW] Update png io
@ -391,7 +391,7 @@ See Commits for more details, after Nov 10.
### Add
- Add CHANGELOG.md
- Format some code
- Format some code
- Add fedora dependencies
### Update
@ -406,6 +406,6 @@ See Commits for more details, after Nov 10.
### Fix
- Fix typesetting and MD error
- Fix fedora dependencies #55
- Fix fedora dependencies #55
- Fix doc.md and README.md

View File

@ -4,12 +4,12 @@
"A-Z a-z 0-9"
"backspace"
"delete"
"enter"
"delete"
"enter"
"tab"
"esc"
"escape"
"up" Up arrow key
"up" Up arrow key
"down" Down arrow key
"right" Right arrow key
"left" Left arrow key
@ -62,7 +62,7 @@
"space"
"print"
"printscreen" // No Mac support
"insert"
"insert"
"menu" Windows only
"audio_mute" Mute the volume
@ -70,7 +70,7 @@
"audio_vol_up" Increase the volume
"audio_play"
"audio_stop"
"audio_pause"
"audio_pause"
"audio_prev" Previous Track
"audio_next" Next Track
"audio_rewind" Linux only
@ -80,15 +80,15 @@
"num0"
"num1"
"num2"
"num3"
"num4"
"num5"
"num6"
"num7"
"num8"
"num9"
"num1"
"num2"
"num3"
"num4"
"num5"
"num6"
"num7"
"num8"
"num9"
"num_lock"
"num."
@ -102,15 +102,15 @@
// "numpad_0" No Linux support
"numpad_0"
"numpad_1"
"numpad_2"
"numpad_3"
"numpad_4"
"numpad_5"
"numpad_6"
"numpad_7"
"numpad_8"
"numpad_9"
"numpad_1"
"numpad_2"
"numpad_3"
"numpad_4"
"numpad_5"
"numpad_6"
"numpad_7"
"numpad_8"
"numpad_9"
"numpad_lock"
"lights_mon_up" Turn up monitor brightness No Windows support
@ -118,4 +118,4 @@
"lights_kbd_toggle" Toggle keyboard backlight on/off No Windows support
"lights_kbd_up" Turn up keyboard backlight brightness No Windows support
"lights_kbd_down" Turn down keyboard backlight brightness No Windows support
```
```