Script Lua document

I have noticed that the Dorico documentation mentions Lua as the recommended language for scripting. It has been a few years since anyone has requested information on using Lua for scripting in Dorico. From what I have seen of the Lua documentation, it appears to be a straightforward language. I wonder if there are any resources available now for using Lua with Dorico, such as a quick start guide. Can anyone provide guidance on this or suggest where I might find more information?

Patrick

I may be wrong but my understanding is the Dorico currently does not yet support scripting. Although there is a ‘Script’ menu I thought it’s only for recorded macros. There are no entry results for a search for scripting in the manual, and various posts here have alluded to what I have said.

I would be delighted to be wrong! I can think of so many uses for scriptability.

Where is this mentioned?

The one and only time that the word “Lua” is mentioned in the Dorico Pro 5 manual (the PDF version) is in the glossary.

Yes, I saw that. Not exactly a recommendation. I am fairly sure @dspreadbury has mentioned scripting is not yet available. And I also thought Dorico does not have a ‘plug-in’ architecture, as some other programs do. There’s discussion in this forum as to why that is technically undesirable.

It might be worth your while to look into the ConsoleTools Lua Framework that I have recently published. One of its goals is to make development of Lua scripts for Dorico more straightforward, and the documentation’s appendix C provides a walkthrough of two example Dorico Lua scripts that are included with the framework.

Caveat: the current main restriction of Dorico’s scripting capabilities – the inability to retrieve useful contextual information from the Dorico application – is something that ConsoleTools cannot compensate.

4 Likes

Dorico does support scripting, but it is limited in scope. Your best way to discover the world of Dorico scripting is to record some actions as scripts.

At the moment, there’s no way of ‘querying’ Dorico for information about the status of an object, but every action in Dorico has a command, which you can discover by recording a script, or looking in the application.log file.

You can do things like use Lua for loops to loop actions through Flows, for example. Alexander of course is the expert.

1 Like

Not exactly ‘user friendly’! :frowning: I hope we can have a fully exposed scripting model in the future instead of a covert operation!

2 Likes

Indeed this has always been in the plans.

1 Like

It’s interesting that you brought up loops. That’s one function that I was going to explore. I’ll take a look at Alexander’s doc.

Thank you all for joining in on the conversation.

1 Like