· How-To · 7 min read
How to Automate Mouse Clicks on Mac for Free
Automate mouse clicks on Mac using free built-in tools like AppleScript and Automator. Plus a no-code alternative for visual recording.
You want your Mac to click things for you. And you do not want to pay for it.
Good news: macOS has built-in tools that can automate mouse clicks. AppleScript and Automator are free, pre-installed, and capable enough for basic click automation.
The tradeoff? They require scripting. There is no visual recorder built into macOS.
This guide walks you through the free methods first, shows their limits, then presents a no-code alternative for when scripting is not worth the effort.
Method 1: AppleScript (Free, Built-in)
AppleScript is the most direct way to automate clicks on Mac without installing anything. It is built into every Mac and accessible through Script Editor.
Setting Up
- Open Script Editor (Applications > Utilities > Script Editor)
- Grant accessibility permissions: System Settings > Privacy & Security > Accessibility — enable Script Editor
Without accessibility permissions, click simulation will not work. This is the most common reason scripts fail silently.
Basic Click at a Position
This script clicks at screen coordinates (500, 300):
tell application "System Events"
click at {500, 300}
end tell
Run it with the Play button in Script Editor. Your Mac clicks at that exact screen position.
Click a Specific App Element
Instead of raw coordinates, you can target UI elements by name:
tell application "System Events"
tell process "Safari"
click button "Reload" of toolbar 1 of window 1
end tell
end tell
This is more reliable than coordinates because it works even if the window moves. But you need to know the exact element hierarchy, which takes trial and error.
Multiple Clicks with Delays
For multi-step click sequences:
tell application "System Events"
-- Click the first button
click at {200, 300}
delay 1.5
-- Click the second button
click at {400, 300}
delay 2
-- Click submit
click at {300, 500}
end tell
The delay command pauses between clicks. Adjust the values based on how long your target app takes to respond.
Click and Type Combo
Combine clicking with keyboard input:
tell application "System Events"
-- Click the search field
click at {500, 100}
delay 0.5
-- Type a search query
keystroke "quarterly report"
delay 0.3
-- Press Enter
key code 36
delay 2
-- Click the Export button
click at {700, 400}
end tell
Repeating Clicks
Loop a click sequence:
repeat 10 times
tell application "System Events"
click at {500, 300}
end tell
delay 3
end repeat
This clicks the same position 10 times with a 3-second pause between each click.
Saving as a Reusable App
To make your script launchable:
- In Script Editor, go to File > Export
- Set File Format to Application
- Save to your Applications folder
Now you have a double-clickable app that runs your automation.
AppleScript Limitations
AppleScript gets the job done, but it has real pain points:
- You need to know exact coordinates. There is no way to “point and click” to set positions. You have to figure out the X,Y values manually.
- Coordinates break when windows move. If you resize or reposition a window, your script misses.
- No visual feedback. You cannot see what the script will do before running it.
- Debugging is frustrating. When a click misses, you adjust numbers and re-run. Repeat until it works.
- Complex workflows get messy. A 20-step workflow means a 60+ line script with hardcoded coordinates.
For a quick 3-click automation, AppleScript is fine. For anything more complex, the scripting overhead becomes the bottleneck.
Method 2: Automator Workflow (Free, Built-in)
Automator offers a visual workflow builder. While it cannot record mouse clicks directly, you can embed AppleScript actions inside an Automator workflow.
Creating a Click Automation in Automator
- Open Automator (Applications > Automator)
- Choose Workflow as the document type
- Search for Run AppleScript in the action library
- Drag it into the workflow area
- Write your click script inside the action block:
on run {input, parameters}
tell application "System Events"
click at {500, 300}
delay 1
click at {700, 400}
end tell
return input
end run
- Click Run to test
Why Use Automator Over Plain AppleScript?
Automator adds value when your workflow mixes click automation with other actions:
- Chain file operations: Click to export, then rename and move the file using Automator actions
- Add notifications: Show an alert when the automation completes
- Save as a service: Access your automation from the right-click menu
Automator Limitations
- The clicking still requires AppleScript code
- No visual click recording
- Apple is shifting focus to Shortcuts (Automator may not receive updates)
- Scheduling requires external tools (launchd or Calendar)
Finding Screen Coordinates
Both AppleScript and Automator need exact screen coordinates. Here is how to find them.
Using Digital Color Meter
- Open Digital Color Meter (Applications > Utilities)
- Hover your mouse over the target element
- Note the position shown in the window title bar
Using Screenshot
- Press Cmd+Shift+4
- Move the crosshair to your target position
- Read the coordinates displayed next to the crosshair
- Press Escape to cancel (you do not need to actually take the screenshot)
The Coordinate Problem
This manual coordinate discovery is the biggest friction point. For every element you want to click, you need to:
- Find the coordinates
- Write them into your script
- Test that they hit the right spot
- Adjust if they are off
- Re-test after any window or resolution change
For a 3-click workflow, this takes 10 minutes. For a 20-click workflow, it takes an hour. And the script breaks the moment something moves.
Method 3: ClickMimic — The No-Code Upgrade (Free Trial)
What if you could skip all the scripting?
ClickMimic takes a different approach: instead of writing code to describe what to click, you just do the task once while ClickMimic watches.
How It Works
- Start your free trial
- Download ClickMimic and grant accessibility permissions
- Click Record
- Perform your workflow at normal speed—click buttons, type text, scroll pages
- Click Stop
- Click Play to replay
That is it. No coordinates. No scripting. No debugging position values.
What ClickMimic Records
Everything AppleScript can simulate, but captured automatically:
- Mouse clicks (left, right, double)
- Mouse drags and scrolls
- Keyboard input (individual keys, shortcuts, full text)
- Timing between every action
What Makes It Better Than Scripting
| Capability | AppleScript | ClickMimic |
|---|---|---|
| Setup time for 10-click workflow | 30-60 minutes | 2 minutes |
| Coordinate discovery | Manual (screenshot method) | Automatic (just click) |
| Review before running | Read the code | Visual timeline |
| Adjust timing | Edit delay values | Drag on timeline |
| Add keyboard input | Write keystroke commands | Just type during recording |
| Schedule execution | Set up launchd manually | Built-in scheduler |
| Fix broken clicks | Debug coordinates in code | Re-record that section |
The Tradeoff
ClickMimic is not free forever. You get a free 7-day trial with full access to every feature. After that, plans start at $10/mo or $70/yr.
The question is whether your time is worth more than the subscription. If you spend 30 minutes writing and debugging an AppleScript that ClickMimic could record in 2 minutes, the math is clear.
Scheduling Your Automation
Scheduling AppleScript
Save your script as an application, then use launchd:
- Create a plist file in
~/Library/LaunchAgents/ - Configure the schedule (daily, hourly, specific times)
- Load it with
launchctl load
This works but requires familiarity with launchd configuration.
Scheduling ClickMimic
- Open the macro settings
- Set the time and frequency
- Done
Built-in scheduling with no system configuration required.
Which Method Should You Use?
Use AppleScript if:
- You need a quick 1-3 click automation
- You are comfortable writing code
- You do not want to install anything
- Budget is the only priority
Use Automator if:
- You need to mix click automation with file operations
- You want a visual wrapper around your AppleScript
- The workflow involves non-click steps (rename files, convert images)
Use ClickMimic if:
- Your workflow has more than 5 clicks
- It involves both clicking and typing
- You do not want to write or debug scripts
- You need scheduling without launchd configuration
- Your time matters more than $10/mo
Get Started
If you want to try the free route first, open Script Editor and paste this:
tell application "System Events"
click at {500, 300}
end tell
Replace the coordinates with your target position. If that solves your problem, you are done.
If you find yourself spending more time writing scripts than doing the actual task, try ClickMimic free for 7 days. Record your workflow in minutes instead of coding it in hours.
Your Mac can do the clicking. You just need to tell it how.
Related guides: How to record mouse clicks on Mac | Automate repetitive tasks on Mac | Best free auto clickers for Mac
Automate this workflow on macOS
Record mouse and keyboard actions, schedule replays, and run no-code automations with ClickMimic.