From e7ab665c511ed5a08132f6e91c9d9b46b0803615 Mon Sep 17 00:00:00 2001 From: vcaesar Date: Thu, 23 Jan 2020 11:40:43 -0400 Subject: [PATCH] add move mouse and move smooth relative examples --- examples/bitmap-bytes/main.go | 1 - examples/mouse/main.go | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/bitmap-bytes/main.go b/examples/bitmap-bytes/main.go index e942599..cc012b9 100644 --- a/examples/bitmap-bytes/main.go +++ b/examples/bitmap-bytes/main.go @@ -30,6 +30,5 @@ func main() { } log.Println("bytes: ", b.Bytes()) - ioutil.WriteFile("out.jpg", b.Bytes(), 0666) } diff --git a/examples/mouse/main.go b/examples/mouse/main.go index c33c8f5..e4ecfb1 100644 --- a/examples/mouse/main.go +++ b/examples/mouse/main.go @@ -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)