Compare commits
2 Commits
develop
...
b20a46cd37
Author | SHA1 | Date | |
---|---|---|---|
b20a46cd37 | |||
0984a36f59
|
28
README.md
28
README.md
@@ -1,3 +1,29 @@
|
|||||||
# autoclick
|
# autoclick
|
||||||
|
|
||||||
Go auto-clicker
|
Go auto-clicker that stores groups of locations.
|
||||||
|
Based on [Robotgo](https://github.com/go-vgo/robotgo).
|
||||||
|
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Depending on your OS, you may require
|
||||||
|
[different dependencies](https://github.com/go-vgo/robotgo?tab=readme-ov-file#requirements).
|
||||||
|
|
||||||
|
If you are running MacOS, you just need to install Xcode Command Line Tools
|
||||||
|
and grant Go the accessibility permissions when prompted from the system.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
xcode-select --install
|
||||||
|
```
|
||||||
|
|
||||||
|
Finally, once dependencies are met, to install autoclick run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
go install gogs.davte.it/Davte/autoclick@latest
|
||||||
|
```
|
||||||
|
|
||||||
|
To launch autoclick from any path, add this to your bash profile or bashrc:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export PATH="$PATH:/$HOME/go/bin"
|
||||||
|
```
|
@@ -6,7 +6,6 @@ import (
|
|||||||
"math"
|
"math"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"strconv"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -188,32 +187,10 @@ func ClickRepeatedly(s *SavedGroups, c chan os.Signal) {
|
|||||||
}
|
}
|
||||||
o := StringOscillator(".", 15)
|
o := StringOscillator(".", 15)
|
||||||
var t int
|
var t int
|
||||||
n := 1
|
|
||||||
var minDistance float64
|
var minDistance float64
|
||||||
for {
|
for {
|
||||||
for i, p := range selection.Points {
|
for _, p := range selection.Points {
|
||||||
if selection.Name == "akoya" { // hardcoded for Akoya presentation. #TODO: better handling (selection action list)
|
p.Click()
|
||||||
if i == 0 {
|
|
||||||
p.RightClick()
|
|
||||||
time.Sleep(100 * time.Millisecond)
|
|
||||||
press("v")
|
|
||||||
time.Sleep(500 * time.Millisecond)
|
|
||||||
} else if i == 1 {
|
|
||||||
time.Sleep(200 * time.Millisecond)
|
|
||||||
p.Click()
|
|
||||||
time.Sleep(200 * time.Millisecond)
|
|
||||||
keyboardWrite(strconv.Itoa(n))
|
|
||||||
n++
|
|
||||||
time.Sleep(100 * time.Millisecond)
|
|
||||||
press("enter")
|
|
||||||
time.Sleep(500 * time.Millisecond)
|
|
||||||
} else {
|
|
||||||
p.Click()
|
|
||||||
time.Sleep(100 * time.Millisecond)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
p.Click()
|
|
||||||
}
|
|
||||||
time.Sleep(100 * time.Millisecond)
|
time.Sleep(100 * time.Millisecond)
|
||||||
}
|
}
|
||||||
fmt.Println(<-o)
|
fmt.Println(<-o)
|
||||||
|
Reference in New Issue
Block a user