From 96fac4f33f708d027be3219b2f27971930f8d00d Mon Sep 17 00:00:00 2001 From: vcaesar Date: Sun, 18 Jan 2026 06:40:56 -0800 Subject: [PATCH] Update: optimize the code and fixed args --- robotgo.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/robotgo.go b/robotgo.go index ebd60f1..40e0394 100644 --- a/robotgo.go +++ b/robotgo.go @@ -721,8 +721,8 @@ func Click(args ...interface{}) error { } double = dbl } - if len(args) > 3 { - count = args[3].(int) + if len(args) > 2 { + count = args[2].(int) } defer MilliSleep(MouseSleep) @@ -758,7 +758,7 @@ func MultiClick(button string, count int, click ...bool) error { } for i := 0; i < count; i++ { - if err := Click(btn, false, count); err != nil { + if err := Click(btn, false, i+1); err != nil { return err } }