Is there a way to invoke a paragraph style with pre-populated text?
What I want to do is create a paragraph style for example “Vamp indications,” assign it to a keep command, perhaps ctr-v, and then instruct it to populate the word “Vamp” when I hit ctr-v.
I can achieve this with macros programmed outside of dorico but I was wondering if there is any way to do this natively.
I too would like that functionality for custom paragraph styles. The macro solution would be totally sufficient for me. But I am wondering how to actually do it.
When recording a macro while pressing Shif+X and entering text the text insertion is not recorded as a command in the script.
Is it a parameter of the function for creating system/staff text I don’t see or does this work completely different?
If this is possible with the scripting functionality I could adjust my user-defined keycommand.json and be happy.
I’m trying to do something similar. I’d like to be able to insert custom rehearsal marks (Verse, Chorus, etc.) in the Rehearsal Marks paragraph style using a macro. Where I’m getting held up is making a change to the Paragraph Style dropdown in the insert text popover (accessed with ‘Shift+x’). I didn’t really follow your script above. I’m using Keyboard Maestro and Streamdeck. Any idea how I could make that Paragraph Style selection in the popover?
If you have a custom paragraph style defined and saved as a default (that is, you clicked the star button so that it’s available in all projects), you can assign a custom key command to it in Preferences. For example, I have a custom style called Expressive Text, and I’ve assigned Alt+Shift+E to it. When I type that combo, the the formatting toolbar comes up with that style already selected.
If you’d rather work with third-party tools and leave Dorico’s key commands out of it, you can also directly create a text item with a custom paragraph style from the Write menu. So my Expressive Text style is available at Write > Create Text > Expressive Text
That’s really helpful! But did I understand correctly that you have to set that custom paragraph style as the default? Meaning that any other time I insert text it will start with my custom rehearsal marks paragraph style?
When you click that button and the star becomes filled in, the properties of whatever you’re editing get saved in your user library file. If you create a new paragraph style and then click the star, it will be available in all your Dorico projects.
In your case, I’d forgotten that you’re just using the existing Rehearsal Marks style. So you don’t need to worry about custom styles; you can just add a key command for creating Rehearsal Marks text: