Hi Richard,
I just wanted to add that the script would only work correctly if the cursor was at the first note of the staff when the mute/un-mute icons are on the staff, which is why there was a (d-MoveCursorRight) command in there (just in case you haven't tested it yet). That part would need to be removed. I got excited and sent the idea without testing it out enough. I plan on setting up the command for each interval. I wouldn't be upset in the slightest if you were not interested in incorporating it in the program, as it is clear you have much you're already working on, but just wanted to share it anyways.
Regards,
R. Wilber