Again, it's not a game-changer, but I could argue that one of the things you have to be careful of when using !SetOption to turn off and on mouse actions on a meter is that mouse actions almost always consist of bangs. Bangs are generally made up of the bang name, the target measure or meter for the bang, and one or more string "parameters" that often can have spaces in them. That means that while:fonpaolo wrote:What I always do is to set up a line of commands, then I copy and paste, edit them accordingly, use "!Show" instead of "!Hide", "[]" instead of the command(s) and so on.
Even if the commands are many, it will take less than a minute.
...but this is only my opinion.
LeftMouseUpAction=[!SetOption SomeMeter Text "Hello world"]
is fine, and turning it "off" might be:
SomeAction=[!SetOption SomeMeter LeftMouseUpAction "[]"]
and that's fine, turning it back "on" would have to be:
SomeAction=[!SetOption SomeMeter LeftMouseUpAction """[!SetOption SomeMeter LeftMouseUpAction "Hello world"]"""]
Since you have embedded "quotes" in the bang you are turning off and on.
What is being suggested is:
LeftMouseUpAction=[!SetOption SomeMeter Text "Hello world"]
SomeAction=[!DisableMouse SomeMeter]
SomeAction=[!EnableMouse SomeMeter]
I find that has a lot of charm, particularly for a new'ish skin author...
Add to this the fact that many mouse actions will have [!UpdateMeter SomeMeter][!Redraw] on them, that also need to be "put back".