File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ package main
12
3+ import (
4+ "fmt"
5+ "time"
6+
7+ "github.com/go-vgo/robotgo"
8+ )
9+
10+ func moveAndClickStepOne () {
11+ fmt .Println ("Moving Mouse" )
12+ robotgo .MoveMouseSmooth (166 , 775 , 1.0 , 7.0 )
13+ fmt .Println ("Clicking" )
14+ robotgo .Click ()
15+ }
16+
17+ func moveAndClickStepTwo () {
18+ fmt .Println ("Moving Mouse" )
19+ robotgo .MoveMouseSmooth (268 , 112 , 1.0 , 7.0 )
20+ fmt .Println ("Clicking" )
21+ robotgo .Click ()
22+ }
23+
24+ func delay () {
25+ fmt .Println ("Delaying with 2 Seconds" )
26+ time .Sleep (2 * time .Second )
27+ }
28+
29+ func main () {
30+ count := 0
31+ iterations := 4
32+
33+ for count <= iterations {
34+ fmt .Println ("Starting iteration" )
35+ moveAndClickStepOne ()
36+ delay ()
37+ moveAndClickStepTwo ()
38+ delay ()
39+ fmt .Println ("finising iteration" )
40+ count ++
41+ }
42+ fmt .Println ("finished all iterations" )
43+ }
You can’t perform that action at this time.
0 commit comments