mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-05-31 06:13:55 +00:00
add move mouse and move smooth relative examples
This commit is contained in:
parent
82dcb4ec53
commit
e7ab665c51
@ -30,6 +30,5 @@ func main() {
|
||||
}
|
||||
|
||||
log.Println("bytes: ", b.Bytes())
|
||||
|
||||
ioutil.WriteFile("out.jpg", b.Bytes(), 0666)
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ import (
|
||||
|
||||
func move() {
|
||||
robotgo.Move(100, 200)
|
||||
robotgo.MoveRelative(10, -200)
|
||||
|
||||
// move the mouse to 100, 200
|
||||
robotgo.MoveMouse(100, 200)
|
||||
@ -32,6 +33,7 @@ func move() {
|
||||
// smooth move the mouse to 100, 200
|
||||
robotgo.MoveSmooth(100, 200)
|
||||
robotgo.MoveMouseSmooth(100, 200, 1.0, 100.0)
|
||||
robotgo.MoveSmoothRelative(10, -100, 1.0, 30.0)
|
||||
|
||||
for i := 0; i < 1080; i += 1000 {
|
||||
fmt.Println(i)
|
||||
|
Loading…
Reference in New Issue
Block a user