mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-05-31 06:13:55 +00:00
Update MouseClick
This commit is contained in:
parent
cddd083cea
commit
322bc1d0e6
@ -9,7 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
#include "../base/types.h"
|
||||
#include "mouse_init.h"
|
||||
#include "mouse_c.h"
|
||||
|
||||
//Global delays.
|
||||
int mouseDelay = 10;
|
||||
|
11
robotgo.go
11
robotgo.go
@ -172,7 +172,16 @@ func MouseClick(args ...interface{}) {
|
||||
var button C.MMMouseButton
|
||||
var double C.bool
|
||||
Try(func() {
|
||||
button = args[0].(C.MMMouseButton)
|
||||
// button = args[0].(C.MMMouseButton)
|
||||
if args[0].(string) == "left" {
|
||||
button = C.LEFT_BUTTON
|
||||
}
|
||||
if args[0].(string) == "center" {
|
||||
button = C.CENTER_BUTTON
|
||||
}
|
||||
if args[0].(string) == "right" {
|
||||
button = C.RIGHT_BUTTON
|
||||
}
|
||||
double = C.bool(args[1].(bool))
|
||||
}, func(e interface{}) {
|
||||
// Println("err:::", e)
|
||||
|
Loading…
Reference in New Issue
Block a user