How to Record Mouse & Keyboard Actions and Replay Them
Recording a macro captures the mouse and keyboard operations you perform as an ordered, timed list of steps. Replay it and you reproduce those exact actions as many times as you like, far faster and more precisely than by hand. It requires no programming — you just do your usual task once — which makes it the easiest entry point into automation. This article walks through the whole flow, from recording to replay to fine adjustments.
Step 1: Prepare to record
A little preparation before you start greatly raises your success rate. First, open the apps and windows involved in the task and arrange them as usual. Then maximise windows where possible. Many macros act on screen coordinates, so if a window's position or size differs between recording and replay, clicks can land in the wrong place. Maximising minimises this drift.
It also helps to rehearse the steps in your head once — which buttons, in what order — so you don't hesitate and record stray actions. And if you do slip up, you can delete the unwanted steps afterward, so there's no need to be overly nervous.
Step 2: Record
When you're ready, press the record hotkey (F9 in makuroku). Then just do your task as usual — open a file, select a range, copy, switch to another window, paste, save. Each click and keystroke is recorded in order. When you're done, press the same hotkey again to stop. Your sequence of actions is now saved as a reusable macro.
A small tip while recording: keep a steady pace so no unnatural pauses creep in between clicks. That said, if you need to wait for an app to load or a screen to switch, that wait is recorded too — and often it's exactly that pause that makes replay reliable, so there's no need to rush.
Step 3: Replay with speed and loop settings
To replay, just press the play hotkey (F5 in makuroku). But the real power of macros is that before you play, you can set the speed and the number of repeats (the loop). Double the speed and the work finishes in half the recorded time. If an app responds slowly, lowering the speed prevents missed steps.
The loop setting really shines for high-volume repetitive work. Loop a "process one record" macro 100 times and 100 records finish in a few minutes. Work that took an hour by hand now needs one recording, and then you just wait for playback. This idea — record once, replay endlessly — is the heart of how automation creates time.
Why playback drifts, and how to fix it
A problem many people hit first is that "clicks land in the wrong place on replay." Usually the cause is that the screen state differs between recording and replay: the display resolution or scaling changed, the window's position or size differs, or you replayed on a different monitor.
There are several fixes. The simplest is to maximise the window for both recording and replay and use the same display settings. If that doesn't solve it, re-record in window-relative "relative-coordinate mode," which records positions relative to the window rather than the whole screen and is more resilient to resolution differences. Even more robust is image recognition, introduced next, which clicks by appearance rather than position.
Fine-tune with step editing
Even if you clicked one wrong button while recording, you don't have to start over. In makuroku you can edit a recorded macro step by step afterward: delete an unwanted click, reorder steps, add a wait, or nudge the coordinates of a single step — all without re-recording.
Being able to edit afterward raises the quality of your automation a level. Add a "wait until the save dialog appears" step by hand, for example, and replay becomes stable. You can also convert a recorded macro into an editable script and add more advanced logic like conditions and loops. Build the skeleton by recording, flesh it out with editing and scripting — this two-step approach is the fast route to automation that holds up in real work.
Handling waits determines replay stability
The biggest stumbling block with recorded macros is handling waits. People unconsciously wait for an app to respond or a screen to switch before their next action. But a recorded macro replays the recording's timing as-is, so if the replay environment is even slightly slower, it may try to press a "button not yet shown" and fail.
There are two fixes. One is to add a fixed wait (a WAIT step) by hand: "after the click, wait 0.5 seconds" absorbs minor delays. The other, more reliable, is to wait based on the screen's state. A conditional wait like "wait until the load-complete icon appears" lets you proceed at just the right moment — neither too early nor too late — even on days when the network or app is slow. It's no exaggeration to say that whether you can build stable automation hinges on this wait design.
A checklist for when recording goes wrong
When replay doesn't behave as expected, the causes are surprisingly limited. Checking the following in order solves most problems:
- • Are the window position and size the same at recording and replay?
- • Has the screen resolution or scaling changed?
- • Is there enough wait before a click for the target to appear?
- • Is security software blocking the recording or sending of input?
- • Is the replay speed too fast for the app to keep up?
If checking these doesn't resolve it, replacing coordinate-dependent parts with image recognition helps. Clicking by "appearance" rather than "visible position" makes it resilient to window moves and resolution differences. Triage with the basic checklist first, then reinforce only the still-unstable spots with image recognition — proceeding in this order gets you to robust automation efficiently.
Tasks that suit recorded macros, and those that don't
Recorded macros are not all-powerful. Understanding what they're good and bad at cuts wasted trial and error. What they do best is "work that proceeds by the exact same steps every time." Open the same screen, click the same spot, type the same text — such routine work can be reliably automated just by recording. Filling a fixed form, sending a templated email, and the same file-save operation are typical examples.
What they're bad at is "work whose situation changes each time": the number of records differs by the day, on-screen content varies by situation, human judgement is needed. Simple record-and-replay can't fully handle these. But this doesn't mean "recording can never do it." Build the skeleton by recording and cover only the changing parts with a script's conditions and loops, or image recognition, and much of the work comes within automation's reach.
The key is not to strain to "automate everything by recording alone." Separate the "fixed parts" and "changing parts" of a task, handle the fixed parts by recording and the changing parts with a little ingenuity. Once you can make this distinction, you'll find that surprisingly much of even seemingly complex work can be automated.
And think of a recorded macro not as "build it and done" but as something you improve little by little as you use it. Even if it's a bit clumsy at first, fix the things that bother you in actual runs — not enough wait, stalling partway — through step editing, and it gradually grows into a stable, practical macro. Rather than bracing for perfection, the secret to lasting is to build something that works first, then grow it.
Thinking about recording and replay speed
Replay speed is an important factor in automation's benefit. You can replay at the recorded speed, but many tools let you adjust it freely. Raise the speed and work finishes faster, but too fast and the app can't keep up, so clicks miss. If you value reliability, setting a slightly slower speed is safer.
A recommendation is to first confirm it works reliably at 1x, then raise the speed gradually to find the upper limit that doesn't break. The optimal speed varies with the task and the app's responsiveness. In a loop processing large amounts of data, even a tiny per-record saving makes a big difference overall. Tune the balance of "speed" and "reliability" to your own work.
Testing recorded macros safely
Running a macro you just built on real data straight away is risky. Because automation runs fast, accurately and repeatedly, any error in the steps mass-produces wrong processing at speed. To avoid irreversible situations, always follow a testing procedure.
There are three tips for safe testing. First, try it on dummy test data or copied files. If you don't use production data directly, a failure does no harm. Second, at first set the loop count to one and the speed slow, and watch each movement with your eyes. Third, only after confirming it behaves as expected, gradually raise the count and speed toward production. Follow this careful procedure and you can introduce automation into your work with confidence.
Combining multiple macros
Once you're used to making one task into one macro, the next stage is combining several macros. Rather than one giant macro for a long task, splitting it into small macros by meaningful chunk makes later management much easier. Split into three small macros — "fetch data," "aggregate," "output report" — and when you want to change only the aggregation, you just swap that part.
Another advantage of splitting into small macros is reusing them as parts. Build a "send templated email" macro once and you can call it again and again across various tasks. Componentise and stockpile your frequent operations, and building a new automation becomes a matter of quickly combining existing parts. Design macros not as "one-off tools" but as "reusable parts" — this mindset greatly raises automation's productivity.
makuroku also has commands to call another macro or script from a script. With these you can combine small parts to build larger automation. One-off macros are enough at first, but as your automations grow, adopting this "componentise and combine" idea lets you automate complex work while keeping it neatly organised.
The key is not to aim for a large, complex system at once. First reliably automate one task, then organise as they grow. Following this natural flow, your automation refines itself comfortably yet steadily.
Organise macros into your own toolbox
Once a macro runs cleanly, save it with a clear name you'll recognise later — something like "Sales report aggregation" or "Save invoice PDF," where the task is obvious at a glance. Collecting macros one by one this way gradually builds your own personal "automation toolbox."
Work that took minutes now finishes with one shortcut, and that accumulation leaves you noticeably more room by the end of the day. With makuroku you can try recording, replay, editing, scripting and scheduling in a single app, free on Windows. Start building your toolbox by recording just one task today.
Try it free
Automate it with makuroku
makuroku records your mouse and keyboard, then replays it automatically. Add SCR scripts and AI (MCP) integration when you need more. All features free to use on Windows.