SetKeyDelay, 50 :*:1:: send, ^{F9} loop, 8 { send, +{left} } send, gra send, {down} send, {return} send, {down} send, s send, {esc} return :*:2:: send, ^{F9} loop, 8 { send, +{left} } send, gra send, {down} send, {return} send, {down} send, s send, {esc} send, j send, {esc} return ; How it works: On selecting a note then pressing number "1" (or number "2"), the script presses a ; quick succession of standard keyboard shortcuts in Musescore which performs ; the following actions in the following order: ; Place cursor in palette search field, ; Select any text already typed into palette search field (by typing "shift+left arrow 8 times), ; Type "gra" to overwrite selected text (if any) and bring up the "grace note" palette, ; Press "down arrow" to select 1st option in palette (add grace note), ; Press "return" to add grace note to selected note, ; Press "down arrow" to transpose the grace note down a semitone, ; Press "s" to add slur, ; Press "esc" to deselect slur ; Stop the process. ;Option "2" is the same as "1" but re-spells the grace note (eg changes B flat to B natural)...