Compare commits

..

2 Commits

Author SHA1 Message Date
603b4e87ef
Adjusted to Akoya 2024-07-05 16:52:20 +02:00
91825584cd
Edited script to download presentation (hard-coded) 2024-07-05 16:11:45 +02:00
2 changed files with 26 additions and 29 deletions

View File

@ -1,29 +1,3 @@
# autoclick # autoclick
Go auto-clicker that stores groups of locations. Go auto-clicker
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"
```

View File

@ -6,6 +6,7 @@ import (
"math" "math"
"os" "os"
"os/signal" "os/signal"
"strconv"
"strings" "strings"
"time" "time"
@ -187,10 +188,32 @@ 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 _, p := range selection.Points { for i, p := range selection.Points {
p.Click() if selection.Name == "akoya" { // hardcoded for Akoya presentation. #TODO: better handling (selection action list)
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)