#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. #SingleInstance force ; Replaces script (Reloads). #Persistent ; to make it run indefinitely #IfWinActive ahk_exe S:\MuseScore 3.6.2 portable\MuseScorePortable\App\MuseScore\bin\MuseScore3.exe ; Enables Hotkeys when MuseScore3 Window is Active ; Replace the path S:\etc. with your location of MuseScore3.exe ; rename List selection.txt in List selection.ahk and put this file in your working directory ; make Statusbar_Articulation.png and put the image in your working directory ; determine the surface coordinates of the image in the statusbar - SB_X1 etc. ; the given coordinates are for the test screen ; more info in Extra__Selection_and_Navigation.pdf - attachment to post 17 on https://musescore.org/en/node/316166 ; NB1: coordinates are not longer valid after screen shift ; NB2: statusbar must always occupy the same surface, e.g. always invoked in full or maximized screen SB_X1 := 0 ; upper-left corner of statusbar SB_Y1 := 1038 SB_X2 := 237 ; lower-right corner of statusbar SB_Y2 := 1079 ; ♣=================================== LIST SELECTION ============================================= ^#RButton:: ; stop making list selection Break_List_Sel_Loop_1 := 1 ; to exit the loop Tooltip, , , , 11 Return ^#LButton:: ; make list selection CoordMode, Tooltip, Screen CoordMode, Mouse, Screen Tooltip, Make List Selection. Click or Control click the notes.`nWhen ready: press Ctrl+Win+RightButton.`nTo reselect the list press Shift+Win+LeftButton., A_Screenwidth / 2, 0, 11 Break_List_Sel_Loop_1 := 0 Sleep, 300 ; to prevent registering as first press Clipboard := "" ; clipboard is made empty Loop { If (Break_List_Sel_Loop_1 = 1) Goto, BreakListSelLoop_1 Keywait, LButton, d Keywait, LButton, u MouseGetPos, X, Y ClipboardText = %X%, %Y% ClipNew := ClipboardText If (A_Index = 1) Clipboard = %ClipNew% If (A_Index > 1) Clipboard = %Clipboard%`n%ClipNew% BreakListSelLoop_1: If (Break_List_Sel_Loop_1 = 1) Break } Tooltip, , , , 11 Return !#RButton:: ; to exit the loop Break_List_Sel_Loop_2 := 1 ; relative to next hotkey Tooltip, , , , 11 Return !#LButton:: ; add to prior list selection CoordMode, Tooltip, Screen CoordMode, Mouse, Screen Tooltip, Add to List Selection. Click or Control click the notes.`nWhen ready: press Alt+Win+RightButton.`nTo reselect the list press Shift+Win+LeftButton.`n, A_Screenwidth / 2, 0, 11 Break_List_Sel_Loop_2 := 0 Sleep, 300 ; to prevent registering as first press Loop { If (Break_List_Sel_Loop_2 = 1) Goto, BreakListSelLoop_2 Keywait, LButton, d Keywait, LButton, u MouseGetPos, X, Y ClipboardText = %X%, %Y% ClipNew := ClipboardText Clipboard = %Clipboard%`n%ClipNew% BreakListSelLoop_2: If (Break_List_Sel_Loop_2 = 1) Break } Tooltip, , , , 11 Return +#LButton:: ; retrieve list selection CoordMode, Mouse, Screen Send {Volume_Mute} ; Mute/unmute the master volume Send {Escape} Sleep, 50 Loop, parse, Clipboard, `n { SendEvent ^{click, %A_LoopField%} } Send {Volume_Mute} ; Mute/unmute the master volume Return ; ♣============================ REMOVE ARTICULATIONS IN LIST SELECTION ============================= ~CapsLock & r:: ; remove articulation in List Selection CoordMode, Mouse, Screen Send {Volume_Mute} ; Mute/unmute the master volume Send {Escape} Sleep, 50 Loop, parse, Clipboard, `n { SendEvent ^{click, %A_LoopField%} Sleep, 250 Send {Esc} Sleep, 50 Send !{right} Sleep, 100 ; 200 ? Loop, 4 ; enables skipping other attached elements { ImageSearch, , , SB_X1, SB_Y1, SB_X2, SB_Y2, *40 Statusbar_Articulation.png If (ErrorLevel = 0) { Send {del} Sleep, 50 Break } If (ErrorLevel = 1) { Send !{right} Sleep, 50 Continue } } Sleep, 30 Send {Escape} } Send {Volume_Mute} ; Mute/unmute the master volume Return