video screen shot for a little script & questions

i know there is no documentation about script and this come soon (?)

I write regularly arrangements for about ten different bands. Many of these arrangements are on Sibelius. When i import a xml file to dorico, i have to do many task, all instrument name, engrave, configuration etc …

i have the project to write a script which read information about a band in a file, and execute all this task …

So i began to write a little script to put automatically instrument name for a given band (here : Pekno Parade)
https://www.youtube.com/watch?v=eoyqbM6YCjQ

I wrote also a little script to format frames automatically.
Here you can see video :
https://www.youtube.com/watch?v=QDQ0vUR5wBs

I suppose you would provide some interface or module, with dialog box etc … ?
Will the syntax change? You will have to use always app:doCommand(…), or you will propose specific modules?

The Lua interfaces will definitely change in the future. We put in some of the low level support for the Lua interpreter before many other areas of the application were established, and so many of the interfaces don’t reflect the application model or document model very well.

We will take a fresh look at scripting in a future version (we can’t say when this will be) and come up with some interfaces that work better with the document model. My current thinking is that there will be several top level interfaces each giving a different ‘view’ of the application or document. eg an ApplicationServices view would give access to message boxes and the command system, the PlaybackView would expose playback-related functionality etc.

Thus at the moment, while waiting you change lua interface, we should not write plugin, just little macro like them, i wrote …
It is promising, much better than manuscript on sibelius

The ‘doCommand()’ function will probably exist in a similar format, though you might need to access it from a different object in the future. Also the command IDs probably won’t change much. So I would expect that scripts like the ones you have here may continue to work after a small amount of editing.

A wish for recording macro :
When you record a macro and you select an object (note, rest, barline, text etc …) in write mode, or a frame in engrave mode, the usermacros contain such type of command
SelectAtPoint?X=coordx&Y=coordY
Even if you select nothing.
SelectAtPoint can be useful in a graphic software to draw a motive, but for a musical notation software, it’s difficult to use

it would be better to record in the macro a command such as :
selectObjectId?Id=numid&type=typeOfObject

and when you select a block :
selectBlock?fromId=numid&fromType=typeOfObject&toId=numid&toType=typeOfObject

It’s not currently possible for us to change the macro recorder in this way as the internal selection model is more complex than just selecting items by ID. However, when we come to implement the APIs then we realise that having good functions to manipulate the selection will be very important.

It’s not currently possible for us to change the macro recorder in this way as the internal selection model is more complex than just selecting items by ID. However, when we come to implement the APIs then we realise that having good functions to manipulate the selection will be very important.

YESSSS !
There is no filter of selection, it is mainly for that reason that today, writing a plugin is very limited …

So, i’m waiting for writing some plugin …

Last question, actually Dorico use lua 5.2,
Lua 5.3 contains new important improvements (utf8, binary data, 64bit, etc …)

5.2 is totally compatible with 5.3, are you going to set up lua 5.3 soon ?

At some point, yes we hope to move to Lua 5.3