GithubHelp home page GithubHelp logo

othyn / macos-auto-clicker Goto Github PK

View Code? Open in Web Editor NEW
197.0 3.0 24.0 36.83 MB

A simple auto clicker for macOS Big Sur, Monterey, Ventura and Sonoma.

License: MIT License

Swift 93.98% Shell 0.83% Ruby 4.68% Makefile 0.51%
macos macos-app auto-clicker auto-click big-sur app apple application autoclick autoclicker

macos-auto-clicker's Introduction

logo

Auto Clicker for macOS

A simple auto clicker for macOS Big Sur (11), Monterey (12), Ventura (13) and Sonoma (14) built with ♥️ in Swift & SwiftUI.


📔 Table of Contents

🌟 About the Project

All the auto clickers out there were either really outdated, old, buggy and/or have legacy code bases. This one aims to fix all that giving you flexibility and style. Plus, I get to write in easter eggs, who says love can't be colourful.

📷 Screenshots

screenshot

👾 Tech Stack

🎯 Features

  • An auto clicker of mouse buttons and presser of keyboard keys!
  • Allows for pressing or clicking;
    • ... of any mouse or keyboard button
    • ... at a given interval
    • ... for a given amount of presses per interval
    • ... for a given amount of times
    • ... after a delayed start
  • Custom keyboard shortcuts to start and stop the clicking or pressing globally
  • Option to keep the window on top for easy access
  • Persists all your options between sessions
  • Fresh and modern UI/UX
  • Lots of colour schemes to suit what ever you prefer

💾 Download

Download for macOS Ventura (13), Sonoma (14) and higher: v1.7.21

Download for macOS Big Sur (11) or Monterey (12): v1.6.1

When first using the app, you will need to right click the app and click 'Open', then on the macOS popup window select 'Open' again to trust this version of the app going forward. This is as at the moment I don't have a paid Apple developer account in order to notarize the app.

When updating the app, does the permission screen get stuck even though you've given it permission? There can sometimes be an issue with this, I'm not entirely sure why this occurs, as the bundle identifier for the app remains the same and therefor the granted permissions shouldn't either. MacOS gets 'stuck' thinking the app has permissions when it doesn't and so the permission splash screen for the app will never go away. To fix it, click the minus button at the bottom of the list of apps under macOS's Accessibility settings where Auto Clicker is listed to manually remove Auto Clicker from the list of permitted apps. Close Auto Clicker and re-open it and grant it access once again, which should fix the issue. More detail can be found in the thread for Issue #64.

For more downloads, checkout the releases page for app downloads of any version you want to use, even pre-release builds too.

⚙️ Preferences Storage

The configuration for the app is stored using NSUserDefaults, via the sindresorhus/Defaults package, meaning all the applications preferences are stored in the following location:

~/Library/Preferences/com.othyn.auto-clicker.plist

This file can be backed up and/or be used transfer your preferences to other machines, although I'll leave the mechanism for doing so up to you.

If you are looking for ideas on how to achieve this, I often like to use Symbolic Links (symlink). By placing the real version of the file in the backup location (in something like a git repo, cloud storage or local/remote storage) and then creating a symlink to the location that the application is expecting, you can safely store the file in the backup location without having to manually move it around or setup auto copy tasks. I accept no responsibility for using this approach, this is for education purposes only, do this at your own risk.

The following commands are an example of how you can achieve this, making sure to close the app first before doing this to avoid any issues:

# Firstly, move the preferences file to the backup location
mv "${HOME}/Library/Preferences/com.othyn.auto-clicker.plist" /path/to/backup/directory/com.othyn.auto-clicker.plist

# Secondly, create a symlink from our backup location to the expected file location for the app
ln -s /path/to/backup/directory/com.othyn.auto-clicker.plist "${HOME}/Library/Preferences/com.othyn.auto-clicker.plist"

Note that both paths used must be the absolute path to the file, any relative paths won't resolve and the symlink will be created but silently fail as it will be pointed at a path that cannot resolve to the target.

🐭 Contributing

See the contribution guide on how to get started. Thank you for contributing!

Detailed within that guide are steps on how...

  • ... issues should be used.
  • ... to setup the project.
  • ... to contribute new languages via the app's localisation support.
  • ... branches should be used.
  • ... commits should be formatted.
  • ... pull requests should be submitted.
  • ... the build process works and the automation that drives it.

This gold star ⭐ can be yours if you can figure out why the emoji is a mouse.

⚠️ License

Distributed under the MIT License. See LICENSE for more information.

💎 Acknowledgements

Useful resources and libraries that have been used in the making of this project.


Why a mouse emoji? Auto Clicker > Click with a mouse > Mouse! ... yeah, I know... I know...

macos-auto-clicker's People

Contributors

anonymousalt0 avatar heiberg avatar othyn avatar will09122000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

macos-auto-clicker's Issues

Cursor Jump Bug on Secondary Monitor in Auto Click Program

Description

I've encountered a persistent bug in the auto click program starting from version 1.5.0 up to the latest version I installed, 1.7.21 (5a1b91e). When the program is initiated, and the cursor is located on a secondary monitor, which is positioned directly above the primary monitor, each click results in a noticeable jump along the y-axis.

Version

1.7.21 (5a1b91e)

Steps to Reproduce

  1. Start the auto click program on a MacBook Pro with the described monitor setup.
  2. Position the cursor on the secondary monitor.
  3. Initiate a click action.

Expected Behavior

The cursor should remain stationary upon clicking, without any jumps or shifts in position.

Actual Behavior

The cursor makes a visible jump along the y-axis with each click when on the secondary monitor.

Screenshots

No response

Device

Apple MacBook Pro with M1 Pro chip

Operating System

macOS Sonoma 14.4.1

Additional Context

  • Primary Monitor Resolution: 3456x2234 pixels
  • Secondary Monitor Resolution: 1920x1080 pixels
  • Connection: USB-C

As a user, I would like to be notified of a new release/update and download it

Not sure how other devs do this, or manage auto update handling, but it would be cool at least to just check if a new release is available. Maybe check for N+1 on the release patch version? Or any major/minor version for that matter, the UI could respond to that and say as such depending on what the latest build version is in comparision to the current one.

Hold autoclick

Hold idea: when pressed, an autoclicker occurs, not pressing and then pressing to turn it off, but holding

As a user, I want to be able to create multiple sequences of action stages

Very far off and blue sky thinking, but I think it would be cool to allow for multiple action stages to be created and then ordered.

So the UI/UX would be a draggable text interface, something like:


Action Stages

= Every <duration field> press <input field> <amount of actions field> times and wait <duration field> before doing it again for a total of <amount of iterations field> times.

= Every <duration field> press <input field> <amount of actions field> times and wait <duration field> before doing it again for a total of <amount of iterations field> times.


In which the user could re-arrange the sequence based on their preferred order of execution.

Taking this further, you could even do conditional logic, but I'm not sure what conditions would be useful or if the feature would be at all.

As a user, I want the UX/UI to be more intuitive to understand

As part of this, I'd love to have a re-factor of the UI to make this easier to understand.

Perhaps in the layout of:

"Every <duration field> press <input field> <amount of actions field> times and wait <duration field> before doing it again for a total of <amount of iterations field> times."

I mentioned this as part of Issue #2 and would like to work on this now, otherwise there are going to be a load of fields with a cramped and non-intuitive UI.

Above all I want this to be easy to use and intuitive following a natural language form pattern.


I want this to be called/referred to as the 'Action Stage'. An action stage is a scentence describing what should occur at each interval of the timer:

"Every <duration field> press <input field> <amount of actions field> times and wait <duration field> before doing it again for a total of <amount of iterations field> times."

Random wait time range

Description

It would be great to support random wait time range, like 0.5s - 1s, since a fixed time can be easily detected as bots

Desired Behavior

support random wait time range, like 0.5s - 1s

Additional Context

No response

Project URL in About Page

Description

It would be beneficial to include this repository's URL on the about page. I had to spend an excessive amount of time searching for this page after having installed the software for a considerable period.

Furthermore, it would be advantageous to include the URL to this repository in the footer section of the main screen.

Desired Behavior

Add repository URL to about page

Additional Context

No response

App can’t be opened

I get this error when opening the app: Auto Clicker can’t be opened because Apple cannot check it for malicious software.

Shortcuts

Description

Even I have changed the shortcuts of the app to start and stop, main app icon on taskbar still show cmd + F

Version

1.6.1

Steps to Reproduce

Change shortcuts in settings
Visit main menu app

Screenshots

No response

Device

MacBook Pro

Operating System

macOS Ventura 13.4.1

Additional Context

No response

As a user, I would like the application preferences stored to a file so I can back it up

At the moment I'm just using the Defaults package to store entities to user defaults, as it was easy and had native Combine support so reactivity and automatic storage to disk was handled as the defined objects were updated.

However, I love to backup preferences for applications I used to git or other such scripts via symlinks and such, it just generally makes it easier if the source of truth for applications was stores somewhere that you can backup.

This is just for me to implement that, removing the Defaults library and replacing it with an alternative that stores to disk. At the moment the simplest way would probably be JSON as you can conform the class to Codable and have some sort of PrefStoreService that handles saving things to disk in place of Defaults.
There may also be a library that handles this with Combine support for SwiftUI.

As a user, I want to be able to specify the pressed key during the action phase

Firstly, great project! Really nice job with it and well written.

This is a feature request, but I think it might be nice/useful if the user could specify what input they want repeated. Obviously right now its set to left click (which makes sense as its an auto clicker 😄 ) But it would be nice if before the user taps the [Start] button, that they could configure the input.
e.g.

  1. Users presses [Configure input] (default is currently left click)
  2. The app then listens to what the user presses next, e.g. right click, or even a key on the keyboard.
  3. Whatever the user pressed is now the thing that will get repeated. So if I right clicked, thats the thing now that will get repeated.

The other thing (and perhaps this is a separate feature request I apologise) would be to specify how many times it should perform the input action after the interval. e.g. Perhaps the user wants to double (left) click every 3 seconds, as opposed to have it click once every 3 seconds. It might be a nice feature to be able to specify how many times it should perform the input.

Again, great job and thanks for this awesome app 👍

Builds on macOS 13 are randomly failing on all channels

Description

I've been trying to debug this all day and I'm getting no where it seems.

I'm randomly getting the following error on a macOS 13 GitHub Actions runner and locally on macOS 13.4, running v6.0.0 (which at first I thought had fixed it until another run later on revealed it hadn't):

Building the DMG failed. Error: Command failed: hdiutil detach /Volumes/AutoClicker

I'm not getting any more information out of it than that.

https://github.com/othyn/macos-auto-clicker/actions/workflows/cicd.yml

The really weird thing is there is no consistency or pattern that I can see as to whether it does it or not, it seems to be truly random from my current understanding, which is kind of evident from the mixture of succeeding and failing builds.

I've about ran out of steam on this today and I'll resume debugging with a fresh head tomorrow.

This wasn't an issue on macOS 12 using version 5.3.0, only after upgrading today to macOS 13 and v6.0.0 am I starting to have issues.

Also posted a bug report here: sindresorhus/create-dmg#83

Version

= v1.6.2

Steps to Reproduce

Unknown at this time, appears to be random

Screenshots

No response

Device

Any Mac

Operating System

macOS 13.x

Additional Context

No response

macOS Ventura Support

As was announced during the WWDC22 keynote speech, the next release of macOS is Ventura and is to be expected later in 2022.

I haven't run Auto Clicker on macOS Ventura yet, as at the moment I don't have a spare machine to run the Ventura Beta on (and haven't had time to spin up a VM), so at this time I have no idea if the app works on Ventura as-is ~ although if you've been running it on Ventura, it would be great to have some feedback on this so please leave a comment on this thread below.

I'm happily accepting any PR's on support for Ventura if support patches are required.

The only other issue is that I will need to wait for GitHub to release a new runner for macos-13 in order to have the CI/CD flow generate builds for Big Sur, Monterey and the newly released Ventura. No doubt there will also be required upgrades and patching to get all that to work due to newer versions of packages (maybe) and Xcode also being required.

Option to allow the menu bar icon to indicate when the auto clicker is running

Description

I want to be able to double-check if the auto clicker is running at a glance. Right now I have to click the menu bar icon to check it is running.

Desired Behavior

Display a different icon (suggestions welcome) when the auto click is running. Perhaps a green play button.

This could be an option in preferences that would be defaulted to being disabled.

Additional Context

I could have a look at this over the weekend, I just want to check whether it would be accepted if I make the pull request.

Autoclick after holding button

Description

Is there any chance to make that autoclik after holding a given button and stop when relase?
Or at least to change shortcuts button?

Desired Behavior

Autoclik after holding button and stop when relase

Additional Context

No response

Computer Crash

Description

If you set it to Left Click 100000000 times, good luck getting your computer to work. I had to hold the power button for 20 seconds (meaning it force shutdown the computer), and it still lagged for the first minute.

Version

1.5.0

Steps to Reproduce

Screenshot 2023-06-19 at 5 38 20 PM

Screenshots

No response

Device

Mac Mini

Operating System

macOS Ventura 13.4

Additional Context

No response

Notifications

Description

Wouldn't it be great if there was an optional feature to display a notification when the process begins and ends?

Desired Behavior

Notifications

Additional Context

No response

Random Cursor Movement by Fixed Radius

Description

The app currently has a feature request for random click timing (see issue #76). To further enhance the app's capabilities and make it more effective, it would be great if the app could also support moving the cursor by a fixed radius randomly.

This feature would reduce the chances of the app being detected as a bot, making it more useful for users who need to simulate natural cursor activity.

Desired Behavior

The app should allow users to define a fixed radius (in pixels) within which the cursor can randomly move at specified intervals. Users should be able to enable or disable this feature through the settings menu. This random movement should make the cursor activity appear more natural and reduce the risk of bot detection.

Additional Context

Related Issues

Example

For instance, if a user sets a radius of 20 pixels, the cursor should randomly move within a 20-pixel radius circle from its starting point at specified intervals. This movement should appear natural and non-linear.

Corrupted preferences file stops the app from being able to run

Description

Even when trying to right click and open thing, it will no longer open on the latest macos

Version

1.5.0

Steps to Reproduce

Download app
Put in applications folder
attempt to open with right click -> open

Screenshots

No response

Device

MacBook Pro

Operating System

macOS 13.3.1

Additional Context

No response

App crash when menu bar icon is disabled

Description

When I disable the "Show menu bar icon" button in the settings and run the app, the application crashes and exits after completing the clicks.

The app works fine if the "Show menu bar icon" is checked. 🤔

Version

1.7.21 (5a1b91e)

Steps to Reproduce

  1. Open the app.
  2. Go to Settings.
  3. Disable the Show menu bar icon option.
  4. Run the auto click operation.
  5. Observe that the app crashes and exits after completing the auto clicks.

Screenshots

No response

Device

MacBook Pro

Operating System

macOS Sonoma 14.5

Additional Context

No response

As a user, I want to be able to specify the amount of actions performed at action phase

The other thing (and perhaps this is a separate feature request I apologise) would be to specify how many times it should perform the input action after the interval. e.g. Perhaps the user wants to double (left) click every 3 seconds, as opposed to have it click once every 3 seconds. It might be a nice feature to be able to specify how many times it should perform the input.

Break out of a sub feature request in Issue #2.

As a user I would like to be able to click every 1.5 seconds (1500 ms)

Is your feature request related to a problem? Please describe.
the largest value for milliseconds is 1000, but I would like to click every 1.5 seconds or 1500 milliseconds, which isn't possible since I can't enter a fractional second nor enter more than 1000 milliseconds.

Describe the solution you'd like
be able to enter more than 1000 milliseconds or enter fractional seconds

Describe alternatives you've considered
n/a

As a user, I would like to be able to pre-set the mouse X/Y coordinates via manually entering them AND recording them

As mentioned in #7 as part of this comment on a reference for chained actions, it would be handy for the user to be able to record or define the mouse action location ahead of time.

This should be a fairly simple addition, as it will be just capturing the location information of the mouse X/Y coord and defining a new global shortcut to trigger the capture (that can be set in preferences) although the UI/UX of it will need some work.

This would encompass doing the following:

  • Mouse X/Y on mouse pressInput types should be stored and used if the user has pre-defined said input, if not it should default to the current mouse position at the time of the action being performed
    • Does this option require a checkbox or some form of sub-UI that only appears of the pressInput type is mouse on the input capture modal?
    • Pre-defined in this case would be manually editing two boxes that store the X and Y coordinates that the user can edit
  • Option to record a mouse point via a shortcut key defined in the app preferences, so the user moves the mouse to the screen postion then confirms it with the keyboard shortcut and its captured by the app and stored as part of the above process
    • This would just capture the value into the boxes above as to save additional processes
    • A simple UI button called 'record mode' or something could do this, with the shortcut key displayed underneath (like the stop watch buttons) in which pressing the button activates the listener and keyboard shortcut until the shortcut is pressed, in which it stops listening at the X and Y coordinates are recorded into the editable boxes

Language Support

Firstly, I need to add Localisation support as part of #36

If anyone would like their language supported, please submit a PR!

The number fields are really glitchy

Description

Its been a problem since the apps inception, but as SwiftUI doesn't have a numeric only field, you have to fudge the TextField with support which is what this app has been running on.

However, this has changed somewhat since this app was first made and there are better ways to handle updates:

https://www.hackingwithswift.com/quick-start/swiftui/how-to-format-a-textfield-for-numbers

I need to review the fields and make support better as at the moment, they're glitchy as anything. Especially when trying to change the field from something like 1 to 5 seconds as you can never remove the 1 as it won't let you empty the field.

Version

latest

Steps to Reproduce

See description.

Screenshots

No response

Device

Any Mac

Operating System

macOS 13.x

Additional Context

No response

Menu bar items rapidly appear/dissapear when waiting for permissions to be granted

Noticed this whilst testing the v1.3.0 release build, and I think its due to the way I have it setup in the application lifecycle.

Information online is really scarce on how to permanently remove menu bar items from SwiftUI apps, even when using the app delegate. Basically I had to just fiddle around with different lifecycle hooks to find something that worked, and even then its still glitchy.

Think I need to revisit the solution for this.

Hold down??

Description

There are instances where I would like to not click, but hold town a mouse press or key. Is there a feature for that?

Desired Behavior

instead of clicking, I am simply holding down a key or mouse stroke

Additional Context

No response

As a user, I want to be able to persist the applications state between sessions

Something I've done on private iOS apps in the past, but need to work out if its the same for macOS and if I can just save these values to a preference bundle or if it requires a defined data store somewhere.

But the idea here is just to persist the apps value state between sessions of the application. This including but not limited to;

  • All fields for the auto clicking definitions
  • Shortcuts for the start/stop buttons

no max number of clicks?

Hi there, thanks for the beautiful app. Unfortunately it doesn't quite suit my purposes since 10k clicks (1 per second) is only about 2 hours of click time. I'd like to leave auto clicking running overnight / all day.

No pressure to actually add this feature, just thought you'd like to know that I tried it out!

By the way, I found your repo by searching "macos auto clicker site:github.com" in Google.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.