mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 06:33:56 +00:00
add CBitmap and more examples
This commit is contained in:
parent
8cbae51c3e
commit
633665224b
@ -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")
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user