Macro: the script doesn't record the closing of the options window

I’m trying to create a keyboard shortcut to quickly switch from colored “Figurenotes” to standard notes (under engraving option), and vice versa. I don’t see a keyboard shortcut possible, so I try with a script (a macro). But the script doesn’t record the closing of the options window (which is the last item). Any suggestion?

In general you can’t have a keyboard shortcut to do this specific thing. Rather than using a macro, you could define a custom shortcut in your key commands JSON file, but you’d need one to choose Figurenotes, and one to choose the default notehead set again.

To switch to Figurenotes, you could define a command in your JSON file with the following string:

Engrave.SetEngravingOptions?Dictionary=list: {string: "noteOptions.defaultNoteheadSet"}\, {string: "noteheadset.figurenotes"}&OpenScoreID=0

To switch back, you could define a command like this:

Engrave.SetEngravingOptions?Dictionary=list: {string: "noteOptions.defaultNoteheadSet"}\, {string: "noteheadset.large"}&OpenScoreID=0

The required OpenScoreID=0 parameter means that these commands will only work on the first project you open in a given Dorico session. You would need to completely quit Dorico and restart it for these shortcuts to work again in a different project file.

1 Like

Hi Daniel, glad to read you.

I don’t know anything about the JSON universe, but I’ll look into it. Thanks a lot.