Global Variables

Atualizado 7 anos atrás

The following variables are directly available to any plugin.

Name Type Description
curScore Score Object the score currently active in MuseScore, if any, see also below (read-only).
division integer number of MIDI ticks for 1/4 note (read-only).
localeName ? ? (currently disabled)
mscore ? ?
mscoreDPI integer ?
mscoreMajorVersion integer the first part of the MuseScore version (read-only).
mscoreMinorVersion integer the second part of the MuseScore version (read-only).
mscoreUpdateVersion integer the third part of the MuseScore version (read-only).
mscoreVersion integer the complete version number of MuseScore in the form: MMmmuu (Major / minor / update; read-only).
pluginPath string the complete path of the running plugin, without file name (read-only).

in MuseScore 1.2+ you can (and should, before accessing curScore in any other form or shape!) test, if at least one score is open with the following code.

if (typeof curScore === 'undefined')
   //no score