mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-05-31 06:13:55 +00:00
Update README.md
This commit is contained in:
parent
0feac878f9
commit
185c253a82
16
README.md
16
README.md
@ -209,6 +209,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/go-vgo/robotgo"
|
||||
"github.com/vcaesar/gcv"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@ -233,6 +234,21 @@ func main() {
|
||||
|
||||
robotgo.SaveBitmap(bitmap, "test.png")
|
||||
}
|
||||
|
||||
func opencv() {
|
||||
name := "test.png"
|
||||
name1 := "test_001.png"
|
||||
robotgo.SaveCapture(name, 10, 10, 30, 30)
|
||||
robotgo.SaveCapture(name1)
|
||||
|
||||
fmt.Print("gcv find image: ")
|
||||
fmt.Println(gcv.FindImgFile(name, name1))
|
||||
|
||||
bit := robotgo.OpenBitmap(name)
|
||||
defer robotgo.FindBitmap(bit)
|
||||
fmt.Print("find bitmap: ")
|
||||
fmt.Println(robotgo.FindBitmap(bit))
|
||||
}
|
||||
```
|
||||
|
||||
#### [Event](https://github.com/go-vgo/robotgo/blob/master/examples/gohook/main.go)
|
||||
|
16
README_zh.md
16
README_zh.md
@ -207,6 +207,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/go-vgo/robotgo"
|
||||
"github.com/vcaesar/gcv"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@ -231,6 +232,21 @@ func main() {
|
||||
|
||||
robotgo.SaveBitmap(bitmap, "test.png")
|
||||
}
|
||||
|
||||
func opencv() {
|
||||
name := "test.png"
|
||||
name1 := "test_001.png"
|
||||
robotgo.SaveCapture(name, 10, 10, 30, 30)
|
||||
robotgo.SaveCapture(name1)
|
||||
|
||||
fmt.Print("gcv find image: ")
|
||||
fmt.Println(gcv.FindImgFile(name, name1))
|
||||
|
||||
bit := robotgo.OpenBitmap(name)
|
||||
defer robotgo.FindBitmap(bit)
|
||||
fmt.Print("find bitmap: ")
|
||||
fmt.Println(robotgo.FindBitmap(bit))
|
||||
}
|
||||
```
|
||||
|
||||
#### [事件](https://github.com/go-vgo/robotgo/blob/master/examples/gohook/main.go)
|
||||
|
Loading…
Reference in New Issue
Block a user