Get Path of current Score
I know curScore can give me the score. But how can I get its path ( where it is saved ) ?
Thanks everyone
I know curScore can give me the score. But how can I get its path ( where it is saved ) ?
Thanks everyone
Do you still have an unanswered question? Please log in first to post your question.
Comments
Preferences/General https://musescore.org/en/handbook/preferences#general
(if I understand what you are looking for)
In reply to Preferences/General by Shoichi
Or maybe:
#17942: pluginPath
#286707: Plugins cannot read `scores` array (not available) and `curScore.name` always delivers "Score"
https://musescore.org/en/node/83306 ?
In reply to Preferences/General by Shoichi
This is for setting the plug-in folder right? I am writing an plugin and need it to get the path of the current score in an string
In reply to This is for setting the plug… by daniellumertz
you unfortunately cannot AFAIK. I stumbled across this issue like a month ago while writing a plugin.
see PR #7083: https://github.com/musescore/MuseScore/pull/7083
In reply to see PR #7083: https://github… by ecstrema
This is coool!! It will come to musescore 3.6 + ?
In reply to This is coool!! It will come… by daniellumertz
It was merged into 3.6 so it should be there.
In reply to It was merged into 3.6 so it… by mike320
sorry if it obvious and I din't understood. I looked at the code on git and the Readme. but I didn't found what function should I call to get the path, I updated to 3.6 here. Also thanks for doing that
In reply to sorry if it obvious and I… by daniellumertz
From looking at the code, you would need to use it like "title" but replace it with "path". There is a warning in the comments of the code that if the file has never been saved you will get an empty path.
In reply to sorry if it obvious and I… by daniellumertz
See 0e396f02
In reply to See 0e396f02 by Jojo-Schmitz
sorry I still doesn't understand what should I write in the plugin
should I write something like:
var p = path()
???
In reply to sorry I still doesn't… by daniellumertz
I believe it should be
var p = curScore.path;
In reply to see PR #7083: https://github… by ecstrema
It isn't documented in the Score Class Reference. How to add it ?
In reply to It isn't documented in the… by parkingb
See this comment right above yours ?
The published API documentation was generated for 3.5 and for some reason not republished with 3.6.2, as is indicated in the header of that documentation.
In reply to See this comment right above… by jeetee
> See this comment right above yours ?
I had seen it. My remark was just about the documentation.
> for some reason not republished with 3.6.2
So my question becomes: how to generate it for 3.6.2 ?
In reply to > See this comment right… by parkingb
Apologies for misreading the question/remark.
I'd imagine running DoxyGen over the 3.6.2 sources should get you a local version. Then open a PR with the result against https://github.com/musescore/MuseScore_PluginAPI_Docs