Running QML scripts
I'm trying to run a QML plugin in MuseScore 4.5.1 (Windows 10, 64-bit) to insert layout breaks after rests in a score. The plugin shows up in the menu and is enabled, but it has no visible effect on the score, and console.log() output does not appear, even when running MuseScore from a terminal.
I confirmed:
The plugins are in the folder shown in Preferences > General > Folders
They appear in Plugins > Plugin Manager, and I can enable them and run them from the menu
I tried multiple plugins: one that adds staff text to each segment, and one that adds a layout break after rests — none had any effect
I am importing scores via MusicXML and saving as .mscz
I experimented with QML on advice from chatGPT - and the bot wrote this topic after our tests. One other wrinkle. The computer is using OneDrive.
Thanks in advance
Attachment | Size |
---|---|
PROVERBS-004.XML | 166.48 KB |
lineBreaksAfterRests.qml | 856 bytes |
testHello.qml | 202 bytes |
testVisible.qml | 646 bytes |
Comments
Did you check the logs?
In reply to Did you check the logs? by Jojo-Schmitz
for a start,
import MuseScore 3.0 (not 4.0)
Qt.quit() must be just quit() for MS4
In reply to for a start, import… by graffesmusic
The former would surely have shown in the logs, the latter would cause MuseSore to crash, if the plugin would have run at all
In reply to for a start, import… by graffesmusic
And as of MuseScore 4.4 you can even drop the version number on import of modules
Couldn't find any way to check the logs.
imported 3.0 and removed qt. reloaded scripts and still no action on the xml or the saved mscz
Thanks for the tries. It would save me 1000s of clicks if I find a way to do this. I tried putting line breaks into my XML but they didn't load.
In reply to Couldn't find any way to… by Bob MacDonald1
Check the logs, you'll find them in
%LOCALAPPDATA%\MuseScore\MuseScore4\
In reply to Check the logs, you'd find… by Jojo-Schmitz
I found the logs -- thanks. The current error message is "Property 'newLayoutBreak' of object mu::engraving::apiv1::Score(0x1f953591ff0) is not a function"
Where would I find info on how to interpret this -- and how to find a function that will do what I want to do.
Thanks for your patience.