Is there a way to apply a named paragraph style directly to selected, existing text items via Lua, without opening the style selection dialogue?
I’m using Dorico 6.2.31 on macOS and would like to apply my custom Actor paragraph style to spoken text in an orchestral score.
Recording the operation produces only:
app:doCommand([[Edit.ChangeParagraphStyle]])
Selecting Actor and clicking OK adds nothing further to the macro. The application log does not reveal a separate command for applying the chosen style either.
I have also tried adding ?ParagraphStyleID=paragraph.defaulttext and ?Style=Actor, without achieving direct assignment.
Does anyone know whether this command accepts a suitable parameter, or whether another Lua-accessible command could do this? I’m specifically interested in changing the style of existing staff-attached or system text, rather than choosing a style when creating new text.
I can name parameters that also appear in various UI ‘boxes’ that I can directly apply with LUA. You might be right though that THIS particular parameter is not assignable that way. Cannot do it until someone proves the opposite.
Also accessible in Dorico preferences dialog (official name + it is rectangular and therefore I would consider it to be a box). I can provide a long list of those possible parameters and commands but it is 23:35 here and sleep is way more important.
Yes, that one is available. But I still believe that in general such things are not available.
You can see this if you record a macro, or if you watch the application log as you do things. If I open the Preferences dialog, the log shows Application.Preferences. If I change most of the settings in that dialog, the log doesn’t record the action, even after pressing Apply. But if I toggle MIDI Thru, the log records the action right away.
As a general rule, if you take an action and it’s not recorded in the log, then I think it’s not available for lua scripting.
I will process neccessary texts with temporary Keyboard Maestro macro.
Is not as elegant as direct LUA approach would be but gets the job done.
Again- will be smarter in the future (in case there is a future for me)- define the necessary paragraph style before and create all actor texts with that style to begin with.
This is called “tailing” a file, and there are a bunch of different ways of doing it, using built in command line tools or third party utilities. On Windows, I use a free app called BareTail.
For Mac users, Terminal’s tail command provides a simple way to watch Dorico’s application log in real time, with new entries appearing automatically as they are written:
This filters the output to show only executed commands, which makes investigating Dorico’s internal command syntax considerably less like searching for a needle in a rather large haystack.
Press Ctrl+C to stop monitoring.
Both commands work with the standard macOS Terminal – no additional software required.