diff --git a/Tracks/graysonsolis_Unselect Topmost Track in Selection.lua b/Tracks/graysonsolis_Unselect Topmost Track in Selection.lua new file mode 100644 index 000000000..6241f3241 --- /dev/null +++ b/Tracks/graysonsolis_Unselect Topmost Track in Selection.lua @@ -0,0 +1,15 @@ +-- @description Unselect Topmost Track in Selection +-- @author Grayson Solis +-- @version 1.0 +-- @about +-- - Checks if more than one track is selected. +-- - If so, identifies the topmost (index 0) selected track. +-- - Deselects that track. + +-- Only proceed if more than one track is selected +if reaper.CountSelectedTracks(0) > 1 then + -- Get the first selected track (topmost) + local topmostTrack = reaper.GetSelectedTrack(0, 0) + -- Deselect it + reaper.SetTrackSelected(topmostTrack, false) +end