How to Record a Macro on Your Mouse
In This Guide
How to Record a Macro on Your Mouse
A mouse macro is a saved recording of mouse movements, clicks, and timing. When you play it back, the computer replays every action exactly as you recorded it, at the same speed or adjusted to whatever pace you prefer. It is one of the most straightforward forms of task automation available on Windows.
People use mouse macros for all kinds of tasks: filling out the same form fields repeatedly, clicking through a multi-step process in a web app, automating repetitive actions in a game, or batch-processing files in software that lacks a built-in macro system. The basic idea is always the same — record once, replay as many times as you need.
There are three realistic ways to record a mouse macro on Windows, each suited to a different situation.
Software Recorder
TinyTask (Free)
One-click recording and replay. No install needed. Works with any mouse on any Windows PC. Best for most users.
Gaming Mouse Software
Logitech G Hub / Razer Synapse
Stores macros on the mouse hardware. Works across computers. Requires a compatible gaming mouse.
Scripting
AutoHotkey (Free)
Write scripts that click at exact coordinates. Conditional logic, loops, and variables. Steeper learning curve.
If you are not sure which method to use, start with TinyTask. It handles the vast majority of mouse macro tasks with almost no setup. The gaming mouse software and AutoHotkey sections below cover the cases where TinyTask is not the right fit.
Record a Mouse Macro with TinyTask
TinyTask is a free, portable Windows utility that records everything your mouse does — every click, movement, scroll, and drag — along with any keyboard input. The recording is saved as a .rec file that you can replay on demand, loop continuously, or export as a standalone .exe that runs without TinyTask installed.
The program is 36KB and requires no installation. Download it, double-click to open, and the toolbar appears. That is all the setup required.
What TinyTask records: Mouse movements, left/right/middle clicks, scroll wheel, drag operations, and keyboard keystrokes. Everything is timestamped so playback timing matches your original recording.
TinyTask Toolbar Buttons
Before recording, it helps to know what each button does. The TinyTask toolbar is small but each button has a specific function:
| Button | Icon | What It Does |
|---|---|---|
| Record | Starts recording all mouse and keyboard activity | |
| Stop | Ends the current recording or stops playback | |
| Play | Replays the last recorded macro from start to finish | |
| Save | Saves the current recording as a .rec file | |
| Open | Loads a previously saved .rec file | |
| Compile | Exports the recording as a standalone .exe file | |
| Speed | Opens the speed slider — drag left to slow down, right to speed up | |
| Options | Loop settings: set a repeat count or enable continuous loop |
Step-by-Step: Recording Your First Macro
Follow these six steps to record and save a mouse macro in TinyTask. The process takes under two minutes.
Download and Open TinyTask
Download TinyTask from the official site. The file is a single 36KB executable — there is no installer. Save it anywhere on your computer, then double-click it to launch the toolbar.
If Windows shows a SmartScreen warning, click “More info” then “Run anyway.” This happens because the file is unsigned, not because it is dangerous. The program is clean and has been used by millions of people since 2004.
Set Up Your Starting State
Before recording, get your screen into the exact state you want the macro to start from. Open the application or browser window, navigate to the right page, and position any windows where they need to be.
This matters because TinyTask records absolute screen coordinates. If a window is in a different position during playback, your clicks may land in the wrong place.
Click Record and Perform Your Actions
Click the Record button (the red circle) on the TinyTask toolbar. The program begins capturing immediately. Now perform every mouse action you want to automate, in the exact order you want them replayed.
- Move your mouse slowly and deliberately — TinyTask records every position in the path, so erratic movement creates a messy playback
- Pause briefly between actions to give applications time to respond
- Click exactly where you intend, not near the target — coordinates are recorded precisely
- Include any keyboard input needed (typing, shortcuts) as part of the same recording
Click Stop to End the Recording
When you have finished performing your actions, click the Stop button (the square) on the TinyTask toolbar. The recording ends immediately and is held in memory, ready to play back.
Do not worry if you made a small mistake at the end of the recording. You can record again at any time and the new recording will replace the previous one in memory (until you save).
Click Play to Test the Macro
Click Play to replay the recorded macro. TinyTask will replay every action at the same timing as your original recording. Watch carefully to confirm all clicks land in the right locations.
If the macro runs too fast or too slow, use the Speed button to open the speed slider:
- Drag left to slow playback down (useful for macros that click faster than the app responds)
- Drag right to speed up (useful when you deliberately paused while recording)
- A setting of 50% is a good starting point if the default speed is causing errors
Save the Macro or Export as .exe
Once the macro works correctly, save it so you can use it later. TinyTask offers two save options:
- Save as .rec — click the Save button, give the file a name, and choose a location. Load it later with the Open button. This is the standard format.
- Compile to .exe — click the Compile button to create a standalone executable. The .exe runs the macro without TinyTask open, and you can send it to other computers. No installation is needed on the target machine.
Looping and Repeat Settings
TinyTask can replay a macro multiple times automatically. Click the Options button to access loop settings:
- Play Count — enter a number to replay the macro that many times then stop
- Continuous Loop — check this option to loop indefinitely until you press the hotkey or Stop button
- Playback Hotkey — set a keyboard shortcut (default is Ctrl+Alt+P) so you can start playback without clicking the toolbar
Pro tip: For continuous-loop macros like auto-clickers, set a modest speed reduction (around 80%) to avoid overloading the target application with inputs faster than it can process.
Best For
- Any Windows PC without a gaming mouse
- Automating browser and desktop apps
- Sharing macros as portable .exe files
- Users who want zero setup or install
- Recording keyboard + mouse together
Key Advantages
- Completely free, no account needed
- 36KB — fits on any USB drive
- Works on Windows XP through Windows 11
- Export as .exe for other machines
- Speed control and loop settings built in
Record Macros with Gaming Mouse Software
If you own a gaming mouse from Logitech, Razer, SteelSeries, or Corsair, each brand ships its own companion software with built-in macro recording. The main advantage over a software tool like TinyTask is that macros can be stored on the mouse’s onboard memory, so they travel with the device from computer to computer.
The trade-off is that these tools only work with their own hardware. A Razer Synapse macro will not run on a Logitech mouse, and vice versa. The recording features are also sometimes more limited than a dedicated macro recorder — depending on the software version, they may not record free-form mouse movement paths, only click sequences and timing.
Logitech G Hub
For Logitech G-series mice
G Hub is Logitech’s current companion software for G-series gaming peripherals. It includes a macro editor with recording and manual editing options. Macros can be assigned to any programmable button on your mouse and stored in either G Hub profiles (cloud sync) or onboard memory (no software required on the target PC).
- Open G Hub and select your mouse from the device list at the top
- Click “Assignments” in the left panel, then select “Macros”
- Click “Create New Macro” and give it a name
- Choose “Record Keystrokes” to capture button presses, or “Record Mouse” for click sequences
- Click “Start Recording,” perform your actions, then click “Stop Recording”
- Edit the delay timings if needed, then assign the macro to a mouse button
Razer Synapse 3
For Razer mice and peripherals
Razer Synapse 3 handles macro recording for all current Razer mice. It supports recording keystroke and click sequences, manual delay editing, and assignment to any button. Macros can be stored in cloud profiles or in the mouse’s onboard memory (available on supported Razer mice with onboard storage).
- Open Razer Synapse 3 and navigate to the “Macros” tab
- Click the “+” button to create a new macro
- Set the recording type to “Record Keystrokes” or “Record All Inputs”
- Click “Start Recording,” perform your sequence, then stop
- Review the recorded events and adjust delay timing as needed
- Go to the “Configure” tab for your mouse, click the button you want to assign, and select your macro
SteelSeries GG (Engine)
For SteelSeries mice
SteelSeries GG combines the older SteelSeries Engine software into one launcher. The macro recording feature lives inside the “SteelSeries Engine” section. You can record button presses and click sequences, adjust timing, and bind macros to any button that supports it on your SteelSeries mouse.
- Open SteelSeries GG and select “Engine” from the sidebar
- Choose your mouse, then click “Configure”
- Right-click any programmable button and select “Macro”
- Click “New Macro,” enter a name, then click “Record”
- Perform your button sequence and click “Stop”
- Save the macro and it will be assigned to that button automatically
Corsair iCUE
For Corsair mice and keyboards
Corsair iCUE handles macro recording for all Corsair SCIMITAR, Dark Core, and M-series mice. The macro editor supports recording mouse buttons, keyboard keys, and delays. Macros can be saved to iCUE profiles or written to onboard memory on supported Corsair mice.
- Open Corsair iCUE and select your mouse from the device list
- Click “Actions” in the top navigation, then choose “Macros”
- Click the “+” button, name your macro, and click “Start Recording”
- Perform the button/click sequence, then click “Stop Recording”
- Go to the “Assignments” section, select a button, and link your macro to it
- Optionally, click “Write to Hardware” to store the macro on the mouse itself
Note: Gaming mouse software macros generally record button presses and click sequences — not free-form mouse movement paths across the screen. For recording a full sequence of mouse movements, drags, and positional clicks, a screen-level recorder like TinyTask gives more accurate results.
Record Mouse Macros with AutoHotkey
AutoHotkey (AHK) is a free scripting language for Windows that can automate almost any mouse or keyboard action. Rather than recording your actions in real time, you write a small script that describes what to do: click at a specific coordinate, pause, click somewhere else, drag, scroll. It requires more effort than TinyTask, but gives you precise control over every detail.
AutoHotkey is particularly useful when you need conditional logic (“only click if this window is open”), loops with varying targets, or when you want to click at the same position regardless of what changed on screen.
Finding screen coordinates: In AutoHotkey, move your mouse over the target and check the coordinates in the AHK Window Spy tool (included in the AHK install folder). Alternatively, hover over a spot and note the X/Y in the Windows taskbar or use the CoordMode tooltip trick.
Basic Click at a Fixed Position
This script assigns a hotkey (Ctrl+F1) that moves the mouse to screen coordinates X=800, Y=450 and left-clicks. Change the numbers to wherever you want the click to happen on your screen.
; Press Ctrl+F1 to click at a fixed screen position
; Change 800 and 450 to your target X and Y coordinates
^F1::
MouseClick, left, 800, 450
ReturnClick Sequence with Delays
This example clicks three buttons in sequence — useful for automating a multi-step form or a sequence of menu options. The Sleep lines add pauses between clicks so the application has time to respond.
; Ctrl+F2 runs a 3-click sequence with 500ms delays ; Coordinates are examples - replace with your own ^F2:: MouseClick, left, 250, 300 ; Click "Open" button Sleep, 500 ; Wait 500 milliseconds MouseClick, left, 500, 400 ; Click dropdown item Sleep, 500 MouseClick, left, 700, 550 ; Click "Confirm" button Return
Click and Drag
This script performs a drag operation from one position to another — for moving files, resizing elements, or scrubbing a timeline. The MouseClickDrag command handles the full press-move-release sequence.
; Press Ctrl+F3 to drag from (100,200) to (400,200)
; Useful for selecting text, moving files, scrubbing video
^F3::
MouseClickDrag, left, 100, 200, 400, 200
ReturnLoop with a Set Repeat Count
This example clicks the same button 10 times with a short pause between each click. Change the 10 to however many repetitions you need. Set count := 0 for a Loop with no limit (runs until you stop the script).
; Ctrl+F4 clicks 10 times at the same position ; Press Ctrl+F5 to stop early ^F4:: Loop, 10 { MouseClick, left, 600, 350 Sleep, 300 } Return ^F5:: ExitApp Return
AHK scripts require AutoHotkey to be installed on every machine where you run them. If you need portability or want something simpler, TinyTask’s compile-to-exe feature is a faster path to a standalone runnable macro.
For users who want to explore further, the AutoHotkey documentation at autohotkey.com covers advanced topics like window-specific targeting, image search (click on an image rather than coordinates), and reading screen text before deciding where to click. See also our comparison: TinyTask vs AutoHotkey for a fuller breakdown of when to use each tool.
Tips for Recording Clean Mouse Macros
A mouse macro is only as reliable as the recording. Sloppy recordings create playbacks that miss buttons, click in the wrong spot, or fail when the system is slightly slower than usual. These eight habits make a real difference in how consistently your macros run.
Move Deliberately and Slowly
Fast, jerky mouse movements record every jitter as coordinates. Moving slowly creates a cleaner path with fewer data points, which plays back more smoothly and reliably.
Add Deliberate Pauses Between Actions
Pause a full second after every click that triggers a page load, dialog box, or app response. The pause is recorded and replayed, giving the application time to catch up.
Use Fixed Window Positions
Position every window in the same spot before recording, and keep it there during playback. Macros record absolute screen coordinates — a moved window breaks every click in it.
Close Unnecessary Applications First
Notifications, pop-ups, and background app windows can steal focus mid-recording. Close them before you start. During playback, a sudden dialog can shift window focus and break the macro.
Test at Reduced Speed First
Run the macro at 50-75% speed before running it at full speed. Slow playback makes it easy to spot when a click is slightly off target before it causes a problem.
Click Precisely on the Target
Center your click in the middle of buttons and form fields rather than clicking near the edge. Precise clicks are more tolerant of minor rendering differences between recording and playback sessions.
Record Shorter Macros and Chain Them
A single 60-second macro is fragile — one wrong click and the rest of the sequence fails. Break complex workflows into 10-15 second chunks and run them in sequence. Shorter macros are easier to debug and re-record.
Avoid Recording Over Dynamic Content
Do not record macros that depend on moving elements (scrolling feeds, countdown timers, dynamically placed ads). Content that changes position between sessions makes coordinate-based macros unreliable.
Troubleshooting Mouse Macro Issues
Most problems with mouse macros come down to a few root causes: coordinates recorded at the wrong screen resolution, timing that does not match the application’s response time, or focus being stolen mid-playback. Here are the six most common issues and how to fix them.
Macro Clicks in the Wrong Position
The click lands somewhere on screen but not where you expected. This almost always means the recording was made at a different screen resolution, display scale, or window position than the current playback session.
Fix
Re-record the macro with the same screen resolution, scaling factor (check Windows Display Settings → Scale), and window position you plan to use during playback. For TinyTask, also confirm no external monitor was added or removed between recording and playback.
Macro Runs Too Fast or Too Slow
The macro plays back but misses elements because it is clicking before the app has loaded, or it takes so long to run that it is not saving you any time.
Fix
In TinyTask, open the Speed control and reduce playback to 60-70% if clicks are missing. If the macro is too slow, you can record it faster by moving more quickly during recording, or increase the speed slider above 100%. For AHK scripts, reduce or increase the Sleep values between actions.
Macro Does Not Work in Games
The macro runs fine in desktop applications but seems to have no effect in a game, or the game crashes when the macro fires.
Fix
First, try running TinyTask as Administrator (right-click → Run as administrator). Many games run with elevated privileges and ignore input from non-admin processes. Second, check whether the game uses anti-cheat software (BattlEye, Easy Anti-Cheat, VAC). These systems may detect and block macro tools. Running macros in games with active anti-cheat can result in account bans — review the game’s terms of service before proceeding.
Macro Stops Unexpectedly Mid-Playback
The macro starts correctly but stops partway through without completing all actions.
Fix
Check for window focus loss. If a notification, pop-up, or Task Manager event gains focus during playback, the target application loses input and the macro appears to stop. Disable notifications temporarily (Windows → Focus Assist), close non-essential apps, and run the macro again. Also check for hotkey conflicts — if another app uses the same hotkey as TinyTask’s stop command, it can interrupt playback.
Recorded Timing Does Not Match Playback
The macro clicks at the right places but the application does not respond because clicks arrive slightly out of sync with what appears on screen.
Fix
This happens when system performance during recording was faster or slower than during playback. The fix is to add extra deliberate pauses when recording — pause two or three seconds after any action that requires the application to load something. The extra time is recorded and replayed, giving the app a buffer to respond. Alternatively, use TinyTask’s speed slider to slow playback by 20-30%.
Macro Won’t Save or Load
TinyTask saves the file without error but when you try to open the .rec file later, it does not load, or the Save button does nothing.
Fix
Check that TinyTask has write permission to the folder you are saving to. Saving to C:\Program Files\ or other protected directories is blocked by Windows without admin access. Save to your Documents folder or Desktop instead. If the file appears to save but is 0 bytes, right-click TinyTask and run as Administrator. Also confirm you have sufficient disk space — very long recordings can generate larger .rec files than expected.
Still having trouble? Most macro issues are solved by re-recording at the correct screen resolution with the target window in a fixed position. Delete the old recording, set up your screen exactly as it will be during playback, and record again from scratch.
Frequently Asked Questions
What is a mouse macro?
A mouse macro is a saved recording of mouse actions — movements, clicks, scrolls, and drags — that can be replayed on command. When you play a macro back, your computer performs the same sequence of actions exactly as you recorded them, at the same position on screen and at the same timing (or faster/slower, depending on your speed settings).
Mouse macros are used to automate repetitive tasks that would otherwise require manual interaction, such as clicking through a multi-step form, performing the same sequence of actions in a game, or batch-processing items in a desktop application. They do not require any programming knowledge to use with a tool like TinyTask — you just record and replay.
How do I record a macro with TinyTask?
Download TinyTask and open it (no installation needed). Click the Record button (red circle), perform your mouse actions, then click the Stop button (square). Click Play to replay the recording. To save it, click the Save button and choose a location for the .rec file. You can load it back later with the Open button.
For full details with screenshots and loop settings, see the TinyTask section of this guide.
Can I record mouse macros for free?
Yes. TinyTask is completely free with no trials, no subscriptions, and no account registration. AutoHotkey is also free and open source. Both handle mouse macro recording without any cost.
Gaming mouse software (Logitech G Hub, Razer Synapse, etc.) is also free to download, but it only works if you own a compatible mouse from that brand. If you want a free option that works with any mouse on any Windows PC, TinyTask is the simplest starting point.
Do mouse macros work in games?
It depends on the game. Mouse macros work in most single-player games and games without anti-cheat systems. They often work in browser games and older PC titles without any restrictions.
Online competitive games are a different matter. Many multiplayer games use anti-cheat software (BattlEye, Easy Anti-Cheat, VAC) that detects and blocks automated input. Using macros in these games can result in temporary or permanent account bans. Always review the game’s terms of service before running macros. Macros stored on gaming mouse hardware (onboard memory) are generally harder for anti-cheat systems to detect, but they are not immune.
How do I loop a mouse macro?
In TinyTask, click the Options button to open loop settings. You can set a specific repeat count (for example, replay 50 times) or enable continuous loop mode, which replays the macro indefinitely until you press the stop hotkey or click Stop.
In AutoHotkey, use a Loop, N block where N is the number of repetitions, or use Loop with no number for an infinite loop. Add an exit hotkey to stop the loop manually. See the AutoHotkey section above for example scripts.
Can I record keyboard and mouse together?
Yes. TinyTask records both mouse actions and keyboard input in a single recording session. Everything is captured together in the correct timing sequence — if you type into a text field between two mouse clicks, the typing plays back at the same point in the sequence.
AutoHotkey also supports combining keyboard and mouse input in a single script. Most gaming mouse software records button presses from both the mouse and keyboard, though the exact capability depends on the software version.
What is the best mouse macro recorder?
For most Windows users, TinyTask is the best starting point: it is free, requires no installation, and handles the majority of recording tasks in under a minute. For users who need conditional logic or precise coordinate control, AutoHotkey provides more flexibility at the cost of needing to write scripts.
If you own a gaming mouse and want macros stored on the device itself, the manufacturer’s software (Logitech G Hub, Razer Synapse, etc.) is the right choice since those macros work across computers without installing any software on each machine. For a broader comparison of dedicated macro recorders, see our guide to the top macro recorders for Windows.
Can I save a mouse macro as an .exe file?
Yes, TinyTask includes a Compile button that exports any recording as a standalone .exe file. The resulting executable contains TinyTask’s playback engine and your macro data bundled together. Double-clicking it on any Windows PC runs the macro without TinyTask needing to be installed.
This is useful for sharing macros with colleagues, running macros on work PCs where you cannot install software, or deploying automated tasks on multiple machines. The .exe file is self-contained and portable.
Do I need a gaming mouse to record macros?
No. Software-based macro recorders like TinyTask and AutoHotkey work with any mouse — a basic $5 USB mouse works exactly the same as a $200 gaming mouse for recording and replaying macros. The mouse hardware itself does not matter for software-level recording.
Gaming mice with onboard memory offer one specific advantage: macros stored in hardware travel with the mouse from computer to computer without any software installed on the target machine. For most users working on their own PC, that feature is not necessary.
Are mouse macros cheating?
In competitive online games with rules against automation, yes — macros are generally considered cheating and violate the terms of service. Anti-cheat systems in games like Fortnite, Valorant, and CS2 actively detect and block macro tools, and players caught using them risk permanent bans.
In single-player games, desktop applications, and workflows, macros are a legitimate productivity tool with no ethical dimension. Automation software like TinyTask is widely used in business, data processing, testing, and accessibility contexts. The “cheating” question only applies to competitive multiplayer environments with explicit rules against it.
How do I speed up or slow down a macro?
In TinyTask, click the Speed button on the toolbar to open a speed slider. Drag it left to slow playback below the original recording speed, or right to play faster than the original. A value around 70-80% is useful when the target application needs extra time to respond between clicks. Values above 100% speed up playback for macros you deliberately recorded slowly.
In AutoHotkey, speed is controlled by the Sleep duration values between commands — reduce the millisecond values to speed up, increase them to slow down. You can also set SetMouseDelay at the top of your script to control how long AHK pauses between mouse commands globally.
Can I edit a recorded macro?
TinyTask does not include a macro editor — .rec files are binary and not designed to be manually edited. If you need to change a recording, the practical approach is to re-record from scratch. This is usually faster than trying to edit the file anyway, especially for short macros.
Gaming mouse software (Logitech G Hub, Razer Synapse, Corsair iCUE) typically includes a macro editor where you can view each recorded event, change delay timings, delete steps, and reorder them. AutoHotkey scripts are plain text files that you can edit in any text editor — this is one of the key advantages of the scripting approach when fine-tuning is important.
Ready to Record Your First Macro?
TinyTask is free, portable, and ready in under a minute. No install, no account, no catch.
Download TinyTask Free36KB — Windows XP through Windows 11 — No installation required