Problem using cmd("file-save-as") with MS3
I'm trying to use the "file-save-as" command with a full path for the filename, (built as fvPath).
Console.log shows that the correct path has been built but issuing the command opens the OS file save dialog and expects me to manually select a folder and file even though I have supplied the full path/filename.
What am I doing wrong?
Comments
Could it not be?:
curScore.startCmd();
// your code here
curScore.endCmd();
In reply to Could it not be?: curScore… by elsewhere
I'll check but I thought that was only for the undo stack.
In reply to Could it not be?: curScore… by elsewhere
It made no difference.
Maybe cmd calls don't take parameters so try using writeScore instead.
In reply to Maybe cmd calls don't take… by yonah_ag
Indeed. Hereby "All the commands in musescore according to musescore"
From cmd.cpp:
commands.txt
In reply to Indeed. Hereby "All the… by elsewhere
There's also this one:
https://github.com/yonah-ag/musescore-cmd/blob/main/MS3-CMD.csv
but it's not clear whether these commands can take parameters.
I have now used writeScore() but I can't find a way of clearing the unsaved flag on the current score, (since it's no longer relevant). This behaviour is different to the menu Save As which does clear the unsaved flag.
In reply to There's also this one: https… by yonah_ag
I don't think that a plugin can clear the unsaved flag.