Docs

RunMacro Documentation

Create your first robot, then go further as needed.

Clear step-by-step guides to create, run, and improve robots for repetitive computer work.

Docs Keyboard Smart Desktop Type
⌨️ Keyboard

Automate Desktop UI Text Typing (Smart Desktop Type) in RunMacro

Smart Desktop Type populates text and dynamic variables into desktop inputs via Windows UI Automation using instant Set Value or realistic keystrokes.

Prerequisites#

  • Target desktop application displays the target input control.

Supported modes#

  • Desktop Mode — Interacts via UIA ValuePattern or Win32 SendInput.

What it does#

The Smart Desktop Type command populates text strings or dynamic variables into desktop inputs (TextBox, RichEdit, PasswordBox) via Microsoft UI Automation. It offers two powerful input modes: Direct Set Value via ValuePattern.SetValue() for instant input of long strings without Vietnamese IME font corruption or focus loss; and Simulated Keystrokes for natural typing with configurable inter-key delays. Includes built-in options to Clear before typing and Press Enter after typing.

Screenshots & video#

RunMacro Smart Desktop Type command configuration dialog showing parameter fields
Configuration dialog and parameter fields for the Smart Desktop Type command in RunMacro.

When to use it#

  • Filling customer IDs, phone numbers, emails, and addresses from Excel into enterprise ERP/accounting fields.
  • Entering passwords and login credentials with an immediate follow-up Enter keystroke.
  • Typing long transaction memos without key drops or IME accent corruption.
  • Clearing existing search filters before typing fresh search query strings.

When not to use it#

  • Web browser inputs (use Smart HTML Type).
  • Global shortcut key combos unattached to specific inputs (use Key Combo).

Configuration steps#

  1. In RunMacro, open the Keyboard › Smart Desktop Type command.
  2. Click 🎯 Pick Element and click the target TextBox control on your screen.
  3. In Text, enter the desired text or variable token (e.g. {tax_id}).
  4. Choose Input Mode: Set Value (instant UIA) or Keystrokes (simulated typing).
  5. Check Clear before typing to wipe existing content.
  6. Check Press Enter after typing to submit forms automatically.
  7. Click Save to insert the command into your workflow.

Every option explained#

🎯 Pick Element#

Interactive target picker overlay to capture target TextBox UIA properties.

Text#

Content to fill into the input field (supports variables such as {full_name}, {email}).

Input Mode#

set_value (instant in-memory UIA ValuePattern assignment) or keystrokes (simulated physical keypresses).

Clear before#

Automatically selects all existing text and deletes it before typing new content.

Press Enter after#

Dispatches an Enter keystroke immediately after text input to submit forms or search filters.

Type delay ms#

Inter-keystroke delay in milliseconds when using Keystrokes mode (default 0ms).

Expected result#

Text is accurately populated into the target field, triggering optional Enter submissions.

Real example#

Example: Fill company tax ID and press Enter to query#

  1. Add a Smart Desktop Type command.
  2. Pick the 'Tax ID' input inside the e-invoicing desktop software.
  3. Set Text to {tax_id}.
  4. Choose Set Value mode, enable Clear before and Press Enter after.
  5. Execute — the tax code fills instantly and submits the search query automatically.

Limitations and failure cases#

  • High-security banking password inputs that block SetValue require Keystrokes mode.

Tips & common mistakes#

Prefer Set Value mode for instantaneous input without interference from third-party Vietnamese IME utilities.
If the target app relies on physical key listeners (onKeyUp / onKeyDown events), switch to Keystrokes mode.

Verification details#

  • commands/smart_desktop_type.py · verified 2026-09-30
RunMacro robot

Robots do the work. Your time is yours.

Create a robot in minutes, no coding needed. Reliable execution, remote management, transparent costs — and you always stay in control.