Old 11-26-2020, 01:55 AM   #1
bhuether
Human being with feelings
 
Join Date: Nov 2016
Posts: 226
Default How to select multiple tracks by track index?

Hi, I have read about GetTrack, but I am trying to find a way to select multiple tracks by track index, so that I can then use a move selected tracks action on the multiple selected tracks.

ideas?
bhuether is offline   Reply With Quote
Old 11-26-2020, 03:00 AM   #2
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,630
Default

https://mespotin.uber.space/Ultrasch...tTrackSelected
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 11-26-2020, 04:36 AM   #3
Yanick
Human being with feelings
 
Yanick's Avatar
 
Join Date: May 2018
Location: Moscow, Russia
Posts: 612
Default

Like this? It selects the 2,3,4 track

Code:
  local t = {
  ---Tracks index---
    2,3,4
  ------------------
  }
  
  for i=1, #t do
    tr = reaper.GetTrack(0,t[i]-1)
    reaper.SetTrackSelected(tr, true)
  end
Yanick is offline   Reply With Quote
Old 11-26-2020, 04:58 AM   #4
bhuether
Human being with feelings
 
Join Date: Nov 2016
Posts: 226
Default

Ah, ok, overlooed SetTrackSelected. Thanks!
bhuether is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:28 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.