mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-03 23:53:54 +00:00
add more mouse example
This commit is contained in:
parent
ad85cfd792
commit
6f5fe3f8f5
@ -23,6 +23,9 @@ func move() {
|
|||||||
// move the mouse to 100, 200
|
// move the mouse to 100, 200
|
||||||
robotgo.MoveMouse(100, 200)
|
robotgo.MoveMouse(100, 200)
|
||||||
|
|
||||||
|
robotgo.Drag(10, 10)
|
||||||
|
robotgo.Drag(20, 20, "right")
|
||||||
|
|
||||||
// smooth move the mouse to 100, 200
|
// smooth move the mouse to 100, 200
|
||||||
robotgo.MoveSmooth(100, 200)
|
robotgo.MoveSmooth(100, 200)
|
||||||
robotgo.MoveMouseSmooth(100, 200, 1.0, 100.0)
|
robotgo.MoveMouseSmooth(100, 200, 1.0, 100.0)
|
||||||
@ -37,8 +40,10 @@ func click() {
|
|||||||
|
|
||||||
// click the left mouse button
|
// click the left mouse button
|
||||||
robotgo.Click()
|
robotgo.Click()
|
||||||
|
|
||||||
// click the right mouse button
|
// click the right mouse button
|
||||||
robotgo.Click("right", false)
|
robotgo.Click("right", false)
|
||||||
|
|
||||||
// double click the left mouse button
|
// double click the left mouse button
|
||||||
robotgo.MouseClick("left", true)
|
robotgo.MouseClick("left", true)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user