mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-05-29 21:43:55 +00:00
update godoc and examples and fix
This commit is contained in:
parent
0a93336c11
commit
0b6a81e6f0
@ -86,6 +86,7 @@ func mouse() {
|
||||
|
||||
// scrolls the mouse either up
|
||||
robotgo.ScrollMouse(10, "up")
|
||||
robotgo.Scroll(100, 200)
|
||||
// toggles right mouse button
|
||||
robotgo.MouseToggle("down", "right")
|
||||
|
||||
|
@ -34,6 +34,7 @@ func main() {
|
||||
|
||||
// scrolls the mouse either up
|
||||
robotgo.ScrollMouse(10, "up")
|
||||
robotgo.Scroll(100, 200)
|
||||
// toggles right mouse button
|
||||
robotgo.MouseToggle("down", "right")
|
||||
|
||||
|
@ -353,7 +353,7 @@ void scrollMouseXY(int x, int y){
|
||||
mouseScrollInputV.type = INPUT_MOUSE;
|
||||
mouseScrollInputV.mi.dx = 0;
|
||||
mouseScrollInputV.mi.dy = 0;
|
||||
mouseScrollInputV.mi.dwFlags = MOUSEEVENTF_HWHEEL;
|
||||
mouseScrollInputV.mi.dwFlags = MOUSEEVENTF_WHEEL;
|
||||
mouseScrollInputV.mi.time = 0;
|
||||
mouseScrollInputV.mi.dwExtraInfo = 0;
|
||||
mouseScrollInputV.mi.mouseData = WHEEL_DELTA * y;
|
||||
|
@ -63,7 +63,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
version string = "v0.48.0.514, Ben Nevis!"
|
||||
version string = "v0.48.0.520, Ben Nevis!"
|
||||
)
|
||||
|
||||
type (
|
||||
@ -549,6 +549,7 @@ func ScrollMouse(x int, y string) {
|
||||
defer C.free(unsafe.Pointer(cy))
|
||||
}
|
||||
|
||||
// Scroll scroll the mouse with x, y
|
||||
func Scroll(x, y int, args ...int) {
|
||||
var msDelay = 10
|
||||
if len(args) > 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user