mirror of
https://github.com/go-vgo/robotgo
synced 2026-05-24 10:19:01 +00:00
commit
a250653ee4
2 changed files with 32 additions and 0 deletions
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 a new issue