Dorico script

I ve tried to record a script, insert a text and then move with arrow a number of times,
I’ve opened the. Lua files with an editor to see what’s going on, and I see that dorico record everything but not the text I had type.
Any of you know how to insert words into the. Lua files? Thanks in advance

I’m not sure this can be done, I’m afraid, Christian. For some commands that have particularly complex or rich data, Dorico stashes the data away internally rather than encoding it as a parameter string passed to the command. We could maybe add a command in future that would take a plain string and create a text item with that string, but it wouldn’t be easily possible to include styling or formatting changes in that command.

Ok. Thank you,
So maybe you can help me… I explain you:
I have done a long long chart with all the possible scales (pitch class set theory) and now on each bar I have to write a word on numeric format like 7-35, 6-16 ecc ecc…
I have this in a Microsoft Word format, so, maybe I can use the lyrics command to put all this names into the score.

I thought to create a space between words long as I need and paste into a lyrics line… Do you things it works?
I need a fast way, it s a pain for me write it manually into the score, it takes me a life time.
Any advice? Thank you

It might be possible to do this using an external macro program. I am on Windows and use AHK, if you are on Mac there are Keyboard Maestro for instance or possibly you can even use automator which AFAIK is a part of OSX.

Can you show an example of what you want to do?

Ok, yes I can.
I have for example 100 bars of music in 4/4,
I need every 4 bars put a text like (4-1), and each bar a number like - 10, +10 ecc ecc

Actually you could try to use lyrics, might be the easiest way after all. This is how I did it (N.B., I am speculating now as you did not provide a screenshot).

Let’s say your scales are on the lower staff. Now create an extra staff with whole notes.

Now paste your lyrics from Word into the extra staff.

Filter the lyrics out and move them to the lower staff.

Now select the top staff and double the note values twice.

Paste into lyrics, verse 2, the text from Word you want every four bars.

Filter all lyrics of top staff, alt+click copy them to second staff:

You will need to find a way of making the hyphens non-breaking. I don’t know how though, maybe someone else will chime in? Or if you can use some other character that does not separate the syllables.

Hope this helps,


Ok thanks, I ll give a try in the afternoon, for the brake I have change the format from 4-10 to 4.10…

I ll let you know, thank you

I ve done, and it works well for me… Thank you
The only thing is that when I paste my word string it does not paste everything in one shot, but I have to paste several times as my syllabus

Yes, you can copy the whole text string in one go, but you have to press paste repeatedly until the string is empty.

Ok, it s just what I wish to avoid… But if it is the only way, I ll do that. Thank you for your support

…but that is easily scriptable. Assuming you are on Windows and have Autohotkey installed:

^F12:: ;makes ctrl+F12 a hotkey
Send, +L ;sends shift+L to start lyrics entry
Loop ;starts a loop
	Send, ^v ;sends ctrl+v to paste
} Until Clipboard = "" ;continues the loop until clipboard is empty

Run this script, copy the text you need from your Word document, select the note where you want to start, press ctrl+F12. The script will repeatedly paste until the clipboard is empty.

Thank you very much! It works fine, great