mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 06:33:56 +00:00
add bitmap click and movesClick func
This commit is contained in:
parent
50ce138395
commit
8733401ce5
14
robotgo.go
14
robotgo.go
@ -62,7 +62,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
version string = "v0.47.0.477, Mount Cook!"
|
||||
version string = "v0.47.0.481, Mount Cook!"
|
||||
)
|
||||
|
||||
type (
|
||||
@ -490,6 +490,12 @@ func MoveClick(x, y int, args ...interface{}) {
|
||||
MouseClick(args)
|
||||
}
|
||||
|
||||
// MovesClick move smooth and click the mouse
|
||||
func MovesClick(x, y int, args ...interface{}) {
|
||||
MoveSmooth(x, y)
|
||||
MouseClick(args)
|
||||
}
|
||||
|
||||
// MouseToggle toggle the mouse
|
||||
func MouseToggle(args ...interface{}) {
|
||||
var button C.MMMouseButton
|
||||
@ -819,6 +825,12 @@ func FindBit(args ...interface{}) (int, int) {
|
||||
return int(pos.x), int(pos.y)
|
||||
}
|
||||
|
||||
// BitmapClick find the bitmap and click
|
||||
func BitmapClick(bitmap C.MMBitmapRef, args ...interface{}) {
|
||||
x, y := FindBitmap(bitmap)
|
||||
MovesClick(x, y, args)
|
||||
}
|
||||
|
||||
// PointInBounds bitmap point in bounds
|
||||
func PointInBounds(bitmap C.MMBitmapRef, x, y int) bool {
|
||||
var point C.MMPoint
|
||||
|
Loading…
Reference in New Issue
Block a user