Update md

This commit is contained in:
vCaesar 2016-10-30 14:28:27 +08:00
parent 991c17a1b8
commit 680c0cbb9c
2 changed files with 92 additions and 0 deletions

View File

@ -111,3 +111,49 @@ func main() {
Println("pos:", x, y)
}
```
###Bitmap
```Go
package main
import (
. "fmt"
"github.com/go-vgo/robotgo"
)
func main() {
bit_map := robotgo.CaptureScreen(10, 20, 30, 40)
Println("...", bit_map)
fx, fy := robotgo.FindBitmap(bit_map)
Println("FindBitmap------", fx, fy)
robotgo.SaveBitmap(bit_map, "test.png")
}
```
###Event
```Go
package main
import (
. "fmt"
"github.com/go-vgo/robotgo"
)
func main() {
keve := robotgo.LEvent("k")
if keve == 0 {
Println("you press...", "k")
}
mleft := robotgo.LEvent("mleft")
if mleft == 0 {
Println("you press...", "mouse left button")
}
}
```

View File

@ -109,3 +109,49 @@ func main() {
Println("pos:", x, y)
}
```
###位图
```Go
package main
import (
. "fmt"
"github.com/go-vgo/robotgo"
)
func main() {
bit_map := robotgo.CaptureScreen(10, 20, 30, 40)
Println("...", bit_map)
fx, fy := robotgo.FindBitmap(bit_map)
Println("FindBitmap------", fx, fy)
robotgo.SaveBitmap(bit_map, "test.png")
}
```
###事件
```Go
package main
import (
. "fmt"
"github.com/go-vgo/robotgo"
)
func main() {
keve := robotgo.LEvent("k")
if keve == 0 {
Println("you press...", "k")
}
mleft := robotgo.LEvent("mleft")
if mleft == 0 {
Println("you press...", "mouse left button")
}
}
```