mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-02 23:23:55 +00:00
Update examples
This commit is contained in:
parent
b83330dc0d
commit
d520880502
@ -62,6 +62,7 @@ func main() {
|
|||||||
// open image bitmap
|
// open image bitmap
|
||||||
openbit := robotgo.OpenBitmap("test.tif")
|
openbit := robotgo.OpenBitmap("test.tif")
|
||||||
fmt.Println("openBitmap...", openbit)
|
fmt.Println("openBitmap...", openbit)
|
||||||
|
|
||||||
fx, fy = robotgo.FindBitmap(openbit)
|
fx, fy = robotgo.FindBitmap(openbit)
|
||||||
fmt.Println("FindBitmap------", fx, fy)
|
fmt.Println("FindBitmap------", fx, fy)
|
||||||
}
|
}
|
||||||
|
@ -106,6 +106,9 @@ func screen() {
|
|||||||
// Read the screen
|
// Read the screen
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
abitMap := robotgo.CaptureScreen()
|
||||||
|
fmt.Println("abitMap...", abitMap)
|
||||||
|
|
||||||
gbitMap := robotgo.BCaptureScreen()
|
gbitMap := robotgo.BCaptureScreen()
|
||||||
fmt.Println("BCaptureScreen...", gbitMap.Width)
|
fmt.Println("BCaptureScreen...", gbitMap.Width)
|
||||||
// fmt.Println("...", gbitmap.Width, gbitmap.BytesPerPixel)
|
// fmt.Println("...", gbitmap.Width, gbitmap.BytesPerPixel)
|
||||||
@ -169,6 +172,7 @@ func bitmap() {
|
|||||||
// open image bitmap
|
// open image bitmap
|
||||||
openbit := robotgo.OpenBitmap("test.tif")
|
openbit := robotgo.OpenBitmap("test.tif")
|
||||||
fmt.Println("openBitmap...", openbit)
|
fmt.Println("openBitmap...", openbit)
|
||||||
|
|
||||||
fx, fy = robotgo.FindBitmap(openbit)
|
fx, fy = robotgo.FindBitmap(openbit)
|
||||||
fmt.Println("FindBitmap------", fx, fy)
|
fmt.Println("FindBitmap------", fx, fy)
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,9 @@ func main() {
|
|||||||
// Read the screen
|
// Read the screen
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
abitMap := robotgo.CaptureScreen()
|
||||||
|
fmt.Println("abitMap...", abitMap)
|
||||||
|
|
||||||
gbitMap := robotgo.BCaptureScreen()
|
gbitMap := robotgo.BCaptureScreen()
|
||||||
fmt.Println("BCaptureScreen...", gbitMap.Width)
|
fmt.Println("BCaptureScreen...", gbitMap.Width)
|
||||||
// fmt.Println("...", gbitmap.Width, gbitmap.BytesPerPixel)
|
// fmt.Println("...", gbitmap.Width, gbitmap.BytesPerPixel)
|
||||||
|
@ -55,7 +55,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
version string = "v0.46.0.377, Pyrenees Mountains!"
|
version string = "v0.46.0.382, Pyrenees Mountains!"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GetVersion get version
|
// GetVersion get version
|
||||||
|
Loading…
Reference in New Issue
Block a user