open_popover
Opens an input popover at the caret for manual text entry, letting you type dynamics, tempo, key, time, or clef markings directly in Dorico. It positions the caret on request and returns typing instructions for the required format.
Instructions
Open an input popover at the caret for manual text entry.
Opens the popover and stops there. Dorico's Remote API cannot populate popovers
directly, so this positions the caret if requested, triggers the
NoteInput.Create* command, and returns the required input format.
Returns:
Result dictionary with the popover kind, caret location, and typing
instructions.
Note:
Requires user interaction in Dorico. Opening a popover leaves it waiting
for keyboard input. Treat anything sent while it waits as unsafe: a modal
dialog leaves later commands accepted but unexecuted (docs/protocol.md,
'Modal Dialog Detection'), and a waiting popover has not been measured to
behave any better.
For an unattended write, put the marking in a ScoreSpec and use write_score:
dynamics and clefs are ScoreSpec fields, and a key or time signature goes in
through write_score(method='musicxml').
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bar | No | Bar to move the caret to first, counted from 1. Omit to open the popover wherever the caret already is. | |
| kind | Yes | Which popover to open: 'dynamic', 'tempo', 'key', 'time' or 'clef'. Each maps to its own NoteInput.Create* command. | |
| staff | No | Staff index, counted from 0, where 0 is the topmost staff in the current layout. Counted differently from a bar number on purpose: bars start at 1, staves at 0. | |
| pickup | No | True when the flow starts with a pickup (upbeat) bar. Dorico does not number it as bar 1, so bar navigation lands one bar short without this. Nothing in the API reveals a pickup, so ask the person whose score it is, or read an exported MusicXML file with read_score. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||