mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-02 23:23:55 +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")
|
robotgo.KeyTap("a", "control")
|
||||||
// hide window
|
// hide window
|
||||||
robotgo.KeyTap("h", "command")
|
robotgo.KeyTap("h", "command")
|
||||||
|
robotgo.KeyTap("h", "command", 12)
|
||||||
|
|
||||||
// press "i", "alt", "command" Key combination
|
// press "i", "alt", "command" Key combination
|
||||||
robotgo.KeyTap("i", "alt", "command")
|
robotgo.KeyTap("i", "alt", "command")
|
||||||
|
robotgo.KeyTap("i", "alt", "command", 11)
|
||||||
arr := []string{"alt", "command"}
|
arr := []string{"alt", "command"}
|
||||||
robotgo.KeyTap("i", arr)
|
robotgo.KeyTap("i", arr)
|
||||||
|
robotgo.KeyTap("i", arr, 12)
|
||||||
|
|
||||||
// close window
|
// close window
|
||||||
robotgo.KeyTap("w", "command")
|
robotgo.KeyTap("w", "command")
|
||||||
|
@ -30,11 +30,14 @@ func key() {
|
|||||||
robotgo.KeyTap("a", "control")
|
robotgo.KeyTap("a", "control")
|
||||||
// hide window
|
// hide window
|
||||||
robotgo.KeyTap("h", "command")
|
robotgo.KeyTap("h", "command")
|
||||||
|
robotgo.KeyTap("h", "command", 12)
|
||||||
|
|
||||||
// press "i", "alt", "command" Key combination
|
// press "i", "alt", "command" Key combination
|
||||||
robotgo.KeyTap("i", "alt", "command")
|
robotgo.KeyTap("i", "alt", "command")
|
||||||
|
robotgo.KeyTap("i", "alt", "command", 11)
|
||||||
arr := []string{"alt", "command"}
|
arr := []string{"alt", "command"}
|
||||||
robotgo.KeyTap("i", arr)
|
robotgo.KeyTap("i", arr)
|
||||||
|
robotgo.KeyTap("i", arr, 12)
|
||||||
|
|
||||||
// close window
|
// close window
|
||||||
robotgo.KeyTap("w", "command")
|
robotgo.KeyTap("w", "command")
|
||||||
@ -122,6 +125,8 @@ func screen() {
|
|||||||
// gets the pixel color at 100, 200.
|
// gets the pixel color at 100, 200.
|
||||||
color := robotgo.GetPixelColor(100, 200)
|
color := robotgo.GetPixelColor(100, 200)
|
||||||
fmt.Println("color----", color, "-----------------")
|
fmt.Println("color----", color, "-----------------")
|
||||||
|
clo := robotgo.GetPxColor(100, 200)
|
||||||
|
fmt.Println("color...", clo)
|
||||||
|
|
||||||
// gets the pixel color at 10, 20.
|
// gets the pixel color at 10, 20.
|
||||||
color2 := robotgo.GetPixelColor(10, 20)
|
color2 := robotgo.GetPixelColor(10, 20)
|
||||||
|
@ -38,6 +38,8 @@ func main() {
|
|||||||
// gets the pixel color at 100, 200.
|
// gets the pixel color at 100, 200.
|
||||||
color := robotgo.GetPixelColor(100, 200)
|
color := robotgo.GetPixelColor(100, 200)
|
||||||
fmt.Println("color----", color, "-----------------")
|
fmt.Println("color----", color, "-----------------")
|
||||||
|
clo := robotgo.GetPxColor(100, 200)
|
||||||
|
fmt.Println("color...", clo)
|
||||||
|
|
||||||
// gets the pixel color at 10, 20.
|
// gets the pixel color at 10, 20.
|
||||||
color2 := robotgo.GetPixelColor(10, 20)
|
color2 := robotgo.GetPixelColor(10, 20)
|
||||||
|
@ -62,7 +62,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
version string = "v0.47.0.449, Mount Cook!"
|
version string = "v0.47.0.455, Mount Cook!"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
@ -70,6 +70,8 @@ type (
|
|||||||
Map map[string]interface{}
|
Map map[string]interface{}
|
||||||
// CHex c rgb Hex type
|
// CHex c rgb Hex type
|
||||||
CHex C.MMRGBHex
|
CHex C.MMRGBHex
|
||||||
|
// CBitmap c bitmap type C.MMBitmapRef
|
||||||
|
CBitmap C.MMBitmapRef
|
||||||
)
|
)
|
||||||
|
|
||||||
// Bitmap is Bitmap struct
|
// Bitmap is Bitmap struct
|
||||||
|
Loading…
Reference in New Issue
Block a user