mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-09 18:13:55 +00:00
Fix move mose args
This commit is contained in:
parent
2e5b26f909
commit
4c9ee3ff34
24
robotgo.go
24
robotgo.go
@ -55,7 +55,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
version string = "v0.45.0.368, Mount Qomolangma!"
|
version string = "v0.45.0.371, Mount Qomolangma!"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GetVersion get version
|
// GetVersion get version
|
||||||
@ -241,14 +241,13 @@ func MoveMouseSmooth(x, y int, args ...float64) {
|
|||||||
high C.double
|
high C.double
|
||||||
)
|
)
|
||||||
|
|
||||||
Try(func() {
|
if len(args) > 1 {
|
||||||
low = C.double(args[2])
|
low = C.double(args[0])
|
||||||
high = C.double(args[3])
|
high = C.double(args[1])
|
||||||
}, func(e interface{}) {
|
} else {
|
||||||
// fmt.Println("err:::", e)
|
|
||||||
low = 5.0
|
low = 5.0
|
||||||
high = 500.0
|
high = 500.0
|
||||||
})
|
}
|
||||||
|
|
||||||
C.aMoveMouseSmooth(cx, cy, low, high)
|
C.aMoveMouseSmooth(cx, cy, low, high)
|
||||||
}
|
}
|
||||||
@ -263,14 +262,13 @@ func MoveSmooth(x, y int, args ...float64) {
|
|||||||
high C.double
|
high C.double
|
||||||
)
|
)
|
||||||
|
|
||||||
Try(func() {
|
if len(args) > 1 {
|
||||||
low = C.double(args[2])
|
low = C.double(args[0])
|
||||||
high = C.double(args[3])
|
high = C.double(args[1])
|
||||||
}, func(e interface{}) {
|
} else {
|
||||||
// fmt.Println("err:::", e)
|
|
||||||
low = 5.0
|
low = 5.0
|
||||||
high = 500.0
|
high = 500.0
|
||||||
})
|
}
|
||||||
|
|
||||||
C.aMoveMouseSmooth(cx, cy, low, high)
|
C.aMoveMouseSmooth(cx, cy, low, high)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user