Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Tracks/graysonsolis_Unselect Topmost Track in Selection.lua
Original file line number Diff line number Diff line change
@@ -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