Scripts

I know how to create a script, but how do I save it to be able to use it again in another project?

The script is saved in ~/Library/Application Support/Steinberg/Dorico/Script plug-ins and is called usermacro.lua. You can move this file somewhere else, call it whatever you like, and then choose to run it again via Script > Run Script.

This is obviously all extremely basic at the moment and will be developed a lot further in future.

I tried your suggestion after initial posting. I copied the file to a folder, then ran Run Script…I went to the folder and file I copied was greyed out, I couldn’t select it.

Provided the script has the file extension .lua, you should find it can be selected in the Run Script file chooser dialog.

Cool !!! It’s the lua langage with the editor here : LuaEdit - Free IDE/Debugger/Editor for Lua (used also by VLC, mysql workbench and many software …)
much better than Manuscript :wink:

i wrote my first script printing “hello world” on the console.
i wrote a little script that reading a file and print them on the console …

i’m on windows (sorry !!) and i don’t find ~/Library/Application Support/Steinberg/Dorico/Script
but lua script seems to be saved in \Program File\steinberg\dorico\lua
I don’t find also usermacro.lua
when you record a macro via script menu, you cannot record it in a lua file ?

and my last question : is there a documentation for the dorico libraries ?

While the team of dorico improves the macro interface, I have time me to train in lua

When you record a macro, the usermacro.lua is created in:

C:\Users\Username\AppData\Roaming\Steinberg\Dorico\Script plug-ins
That’s if you are on Windows.
You can rename it and copy/move wherever you like. Just keep the file extension.

Thank you Misohoza !!!

Which release of Lua is used by dorico ? 5.3 ?

ok i see, it’s 5.2 …
with
print(_VERSION)