Compare commits

..

No commits in common. "b20a46cd3758a6f8ae2c48c8a8c3b962fdc227d9" and "b21e09cbb78339184215a00693e9c0e8e07939ac" have entirely different histories.

2 changed files with 3 additions and 49 deletions

View File

@ -1,29 +1,3 @@
# autoclick
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"
```
Go auto-clicker

View File

@ -22,17 +22,9 @@ func (p Point) String() string {
return fmt.Sprintf("(%v, %v)", p.X, p.Y)
}
func (p Point) Click(button ...string) {
buttonToClick := "left"
if len(button) > 0 && (button[0] == "left" || button[0] == "right") {
buttonToClick = button[0]
}
func (p Point) Click() {
robotgo.Move(p.X, p.Y)
robotgo.Click(buttonToClick, false)
}
func (p Point) RightClick() {
p.Click("right")
robotgo.Click("left", false)
}
func (p1 *Point) GetDistance(p2 *Point) float64 {
@ -153,15 +145,6 @@ func StringOscillator(s string, amplitude int) chan string {
return c
}
func press(key string) {
robotgo.KeyTap(key)
}
func keyboardWrite(s string) {
robotgo.TypeStr(s)
robotgo.MilliSleep(100)
}
func ClickRepeatedly(s *SavedGroups, c chan os.Signal) {
for index, g := range s.Groups {
fmt.Printf("- Press %v to select %v\n", index+1, g.Name)
@ -176,9 +159,6 @@ func ClickRepeatedly(s *SavedGroups, c chan os.Signal) {
fmt.Scanln(&discard)
continue
}
if choice > len(s.Groups) {
choice = 0
}
}
selection := s.Groups[choice-1]
fmt.Printf("You selected %v. I'll be clicking in the following positions:\n", selection.Name)