Macro recording

Record a Mouse and Keyboard Macro on Windows

Record mouse and keyboard input, clean up the captured steps and test a supervised Windows macro before you repeat it.

By Osenpa Published Reviewed

Short answer

A macro is a saved list of actions. Record one clean example, review every captured action and test it once before adding repetition. The starting window, focus and timing still matter because playback sends input to the active desktop.

When to use this method

Recording is useful when a real sequence is faster to demonstrate than to build one step at a time. It is not background automation and it does not control applications through an API.

Recording and replay limitsWhich actions can be recorded and why timing still needs a test run.
Recorded actions
A recording can include keys, clicks, Mouse 4 and Mouse 5, drag, vertical or horizontal scroll and optional pointer movement. The review screen lets you edit, select, reorder, duplicate or remove captured actions before adding them as steps.
Important limit
If a window opens more slowly during replay, the next step can arrive too early. Keep a deliberate delay or wait for a stable visual condition.

Record a clean macro from start to finish

1. Describe the result before recording

Write the result in one sentence, such as "Open the form, enter the sample name and save it once." Use that sentence to check the replay.

2. Prepare the visible desktop

Open one harmless test window. Put its cursor in the first field. A window has focus when it is the one receiving your typing and clicks. Close notifications that could cover the test window.

3. Choose privacy and capture options

Open Record Actions. Choose the selected test window if the recording should stay inside it. Keep only the input categories you need. Leave pointer movement off for this first test. You should see the selected window named in the recorder.

4. Record one regular example

Start the countdown. When recording begins, click the test field, type Sample and press Tab once. Stop recording. You should see the review dialog. Avoid correcting unrelated work because those corrections would become replay steps.

5. Review every captured action

Read the list from top to bottom. Remove stray clicks and pointer movement, correct text, confirm mouse buttons and preserve enough delay for the target application to respond. Use multiselect to reorder or delete related actions together. You should see only the click, Sample text and Tab action you meant to record.

Review recorded actions dialog with mouse and keyboard actions and controls to edit, move, duplicate or remove them.
Remove accidental actions and confirm only the steps you meant to record.

6. Add the reviewed actions

Confirming the review adds the recording as one undoable change. Canceling adds nothing. Select Confirm. You should see the reviewed actions in Steps.

7. Test one run

Clear the test field and put focus back on the same starting window. Use the configured Run key. Keep F12 available as the permanent Emergency Stop. You should see Sample entered once. Add a loop or schedule only after this clean replay works.

Why focus and timing still matter

Recorded actions repeat input; they do not understand a button or text box. Stop if another window takes focus, a page loads slowly or an elevated app rejects the input.

Add a deliberate delay or a tested image, color, or number condition wherever timing can vary. Input Variation can make small timing or click-position changes within the limits you set. It does not fix lost focus, hide automation, or bypass bot protection.

Checkpoint: replay once from a reset state

Before adding a loop, return the test window to its original state and replay the steps you checked once. Continue only if the intended result appears and F12 stops the harmless test immediately.

Watch for

Common recording problems

  • Recording real passwords, account details or personal files
  • Capturing notifications or an accidental window change
  • Removing every delay from an application with variable response time
  • Starting a loop before one clean replay succeeds
Verify the result

Replay checks

  • Confirm that every step is intentional.
  • Test from the same starting window, state and focus.
  • Verify that the configured Run and Stop key works, then press F12 once in a harmless test to confirm Emergency Stop.
  • Confirm the expected result, not only the number of actions.
  • Re-test after changing display settings, focus, permissions, the target app or its starting state.
Action recording controls in Osenpa Auto Clicker
Step by step

Osenpa Auto Clicker

Record and edit visible mouse and keyboard workflows, then add only the conditions, loops, schedules or reusable parts the task needs.