mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-02 23:23:55 +00:00
add addMouse examples code
This commit is contained in:
parent
ef8856688b
commit
e0ac006ff1
@ -40,6 +40,20 @@ func addEvent() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func addMouse() {
|
||||||
|
fmt.Println("--- Please press left mouse button ---")
|
||||||
|
ok := robotgo.AddMouse("left")
|
||||||
|
if ok {
|
||||||
|
fmt.Println("add mouse...")
|
||||||
|
}
|
||||||
|
|
||||||
|
fmt.Println("--- Please press left mouse button and move mosue to 100,100 ---")
|
||||||
|
ok = robotgo.AddMouse("left", 100, 100)
|
||||||
|
if ok {
|
||||||
|
fmt.Println("add mouse and move to 100,100 ...")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func add() {
|
func add() {
|
||||||
fmt.Println("--- Please press v---")
|
fmt.Println("--- Please press v---")
|
||||||
eve := robotgo.AddEvent("v")
|
eve := robotgo.AddEvent("v")
|
||||||
@ -88,5 +102,7 @@ func main() {
|
|||||||
|
|
||||||
addEvent()
|
addEvent()
|
||||||
|
|
||||||
|
addMouse()
|
||||||
|
|
||||||
event()
|
event()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user