mirror of
https://github.com/go-vgo/robotgo
synced 2026-05-23 17:59:12 +00:00
Update: optimize the code and fixed args
This commit is contained in:
parent
59e4b3007c
commit
96fac4f33f
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue