Skip to content

Commit

Permalink
Create smandrap_Select all visible tracks in Mixer.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
smandrap committed Feb 15, 2024
1 parent cf17cc4 commit c2f3e4b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Tracks/smandrap_Select all visible tracks in Mixer.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
-- @description Select all visible tracks in Mixer
-- @author smandrap
-- @version 1.0
-- @donation https://paypal.me/smandrap
-- @about
-- Does what it says.

reaper.Undo_BeginBlock()
reaper.Main_OnCommand(40297, 0) -- Unselect All

for i = 0, reaper.CountTracks(-1) - 1 do
local t = reaper.GetTrack(-1, i)
if reaper.IsTrackVisible(t, true) and reaper.GetMediaTrackInfo_Value(t, 'I_MCPW') > 0 then
reaper.SetTrackSelected(t, true)
end
end

reaper.Undo_EndBlock("Select All visible tracks in Mixer", 0)

0 comments on commit c2f3e4b

Please sign in to comment.