Overview
Performs a double-click action on an element. Commonly used to open files, folders, or select words in text fields.Syntax
Parameters
Element reference from snapshot (
@e1, @e2, etc.)Response
Response Fields
The action performed (
double_click)The element reference that was double-clicked
Element state after the action
AX-First Strategy
The double-click command uses accessibility APIs when available, then falls back to:- Native double-click action if exposed via AX
- Two rapid
kAXPressActioncalls - Mouse double-click at element center
Usage Examples
Open a File in Finder
Select a Word in Text Editor
Open Folder
Common Use Cases
- File Management: Open files and folders in Finder
- Text Selection: Select words in text fields and editors
- Desktop Icons: Launch applications from desktop
- List Items: Open items in list views
Error Cases
| Error Code | Cause | Recovery |
|---|---|---|
ELEMENT_NOT_FOUND | Ref doesn’t exist in current refmap | Run snapshot to refresh |
STALE_REF | Element no longer matches saved ref | Run snapshot and use new ref |
ACTION_FAILED | Element doesn’t support double-click | Try single click or alternative action |
Notes
- Timing between clicks is platform-optimized (typically 200-300ms)
- Some apps may treat double-click as two single clicks
- Use
triple-clickfor line/paragraph selection - Always snapshot after double-click to capture resulting UI changes