DocsMouseSmart Click

Smart Click Command Reference (Windows UI Automation)

Desktop ModeRunMacro 3.5+

Smart Click is an advanced desktop automation click command that directly targets UI elements via Windows UI Automation rather than fixed pixel coordinates. It eliminates coordinate drift when apps move, resize, or display at different DPI settings.

Dialog & quick setup

RunMacro Smart Click command configuration dialog showing parameter fields
Configuration dialog and parameter fields for the Smart Click command in RunMacro.
  1. In RunMacro, open Mouse › Smart Click (located at the very top of the Mouse group).
  2. Click 🎯 Pick Element — the RunMacro window hides temporarily and a live green highlight tracker follows your cursor.
  3. Hover over the target button or control in your desktop app, then left-click (or press Enter / Space) to pick.
  4. The dialog reappears showing the detected element name and control type.
  5. Choose the Strategy: Left click, Right click, or Double click.
  6. In the Advanced tab (optional), configure fallback policy (Coordinate / None) or attach a fallback image.
  7. Click Save to insert the Smart Click command into your workflow.

Options reference

🎯 Pick Element

Launches an interactive live UI picker overlay. The target window and element identity are captured automatically.

Strategy (Left click / Right click / Double click)

Choose the click action: Left click to trigger controls; Right click for context menus; Double click to open files or folders.

Fallback Policy

Strategy when the UIA element is temporarily unavailable. Defaults to coordinate (clicks relative to the target window), or none (fails immediately).

Fallback Image

A visual template image for fallback matching. Automatically saved only when sufficient texture is detected, avoiding flat monochrome patterns.

Allow full-screen search if needed

Expands visual fallback template searching to the full screen if the target window is partially occluded.

Delay after command

Random Min–Max delay range (ms) to pause after clicking before executing the next command (default 500–1500ms).

Modes & when to use

Desktop Mode

Resolves controls directly via Windows UI Automation and Win32 APIs.

Best for

  • Click buttons, switch tabs, or interact with controls in desktop apps (Excel, ERP, accounting software, Telegram, WinForms, WPF, Electron, etc.).
  • When application windows frequently move, resize, or display across monitors with different DPI/resolutions.
  • When you need reliable double-click or right-click directly on target UI controls.
  • When you want smart element resolution with automatic visual fallback.

Use an alternative when

  • Automating web browsers (use Smart HTML or Chrome CDP instead).
  • 3D games or custom canvas applications that do not expose standard UIA accessibility trees.
Before you run
  • The target desktop application is running on screen.
  • The element has been captured using the Pick Element tool.

Example workflow

Example: Auto-click "Save" in an accounting app

  1. Add a Smart Click command.
  2. Click 🎯 Pick Element, hover over the "Save" button on the toolbar, and click.
  3. Keep the strategy as Left click.
  4. Save the command — even if the accounting app moves or resizes, RunMacro will accurately find and click the Save button.
Expected result: RunMacro brings the target window to foreground and clicks directly on the center of the selected UI element.

Tips & limitations

Smart Click does not depend on screen resolution or window placement, making it ideal for sharing workflows across different computers.
If the target application runs as Administrator, launch RunMacro as Administrator so Windows grants access to the UIA element tree.
  • Not intended for web browsers (use Smart HTML instead).
  • Some custom canvas applications may rely on the visual image fallback.

Applies to RunMacro 3.5+ · Desktop Mode · Windows 10/11

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.