-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
37 lines (25 loc) · 771 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//go:build windows
package main
import (
"time"
"github.com/dacapoday/sendinput"
)
var build = "unknown"
func main() {
time.Sleep(5 * time.Second)
sendinput.SendTextInput("Hello 中文测试 world!")
time.Sleep(1 * time.Second)
sendinput.SendMouseWhlInput(0, 1000)
time.Sleep(1 * time.Second)
sendinput.SendMouseWhlInput(0, -500)
time.Sleep(1 * time.Second)
sendinput.SendKeyboardInput(sendinput.KEY_0, true)
sendinput.SendKeyboardInput(sendinput.KEY_0, false)
sendinput.SendMouseBtnInput(sendinput.MOUSE_RIGHTDOWN)
sendinput.SendMouseBtnInput(sendinput.MOUSE_RIGHTUP)
sendinput.SendMouseRelInput(10, 0)
sendinput.SendMouseRelInput(0, 20)
time.Sleep(1 * time.Second)
sendinput.SendMouseRelInput(-10, 0)
sendinput.SendMouseRelInput(0, -10)
}