From cb549ee9398267cb7baa400a5e991fda188533f8 Mon Sep 17 00:00:00 2001 From: vcaesar Date: Wed, 5 Jun 2019 12:59:50 -0400 Subject: [PATCH] add drag smooth function support --- robotgo.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/robotgo.go b/robotgo.go index e67aa18..d4f4462 100644 --- a/robotgo.go +++ b/robotgo.go @@ -382,6 +382,13 @@ func Drag(x, y int, args ...string) { C.drag_mouse(cx, cy, button) } +// DragSmooth drag the mouse smooth +func DragSmooth(x, y int, args ...interface{}) { + MouseToggle("down") + MoveSmooth(x, y, args...) + MouseToggle("up") +} + // MoveMouseSmooth move the mouse smooth, // moves mouse to x, y human like, with the mouse button up. func MoveMouseSmooth(x, y int, args ...interface{}) bool {