add CBitmap and more examples

This commit is contained in:
vcaesar 2017-12-24 23:01:22 +08:00
parent 8cbae51c3e
commit 633665224b
4 changed files with 13 additions and 1 deletions

View File

@ -30,11 +30,14 @@ func main() {
robotgo.KeyTap("a", "control")
// hide window
robotgo.KeyTap("h", "command")
robotgo.KeyTap("h", "command", 12)
// press "i", "alt", "command" Key combination
robotgo.KeyTap("i", "alt", "command")
robotgo.KeyTap("i", "alt", "command", 11)
arr := []string{"alt", "command"}
robotgo.KeyTap("i", arr)
robotgo.KeyTap("i", arr, 12)
// close window
robotgo.KeyTap("w", "command")

View File

@ -30,11 +30,14 @@ func key() {
robotgo.KeyTap("a", "control")
// hide window
robotgo.KeyTap("h", "command")
robotgo.KeyTap("h", "command", 12)
// press "i", "alt", "command" Key combination
robotgo.KeyTap("i", "alt", "command")
robotgo.KeyTap("i", "alt", "command", 11)
arr := []string{"alt", "command"}
robotgo.KeyTap("i", arr)
robotgo.KeyTap("i", arr, 12)
// close window
robotgo.KeyTap("w", "command")
@ -122,6 +125,8 @@ func screen() {
// gets the pixel color at 100, 200.
color := robotgo.GetPixelColor(100, 200)
fmt.Println("color----", color, "-----------------")
clo := robotgo.GetPxColor(100, 200)
fmt.Println("color...", clo)
// gets the pixel color at 10, 20.
color2 := robotgo.GetPixelColor(10, 20)

View File

@ -38,6 +38,8 @@ func main() {
// gets the pixel color at 100, 200.
color := robotgo.GetPixelColor(100, 200)
fmt.Println("color----", color, "-----------------")
clo := robotgo.GetPxColor(100, 200)
fmt.Println("color...", clo)
// gets the pixel color at 10, 20.
color2 := robotgo.GetPixelColor(10, 20)

View File

@ -62,7 +62,7 @@ import (
)
const (
version string = "v0.47.0.449, Mount Cook!"
version string = "v0.47.0.455, Mount Cook!"
)
type (
@ -70,6 +70,8 @@ type (
Map map[string]interface{}
// CHex c rgb Hex type
CHex C.MMRGBHex
// CBitmap c bitmap type C.MMBitmapRef
CBitmap C.MMBitmapRef
)
// Bitmap is Bitmap struct