I am using the following script to select events on the timeline but this script selects all the tracks on the timeline. I need to modify the script so that I would only select the events of the selected track only.
SCRIPT:
using ScriptPortal.Vegas;
namespace Test_Script
{
public class Class1
{
public Vegas myVegas;
public void Main(Vegas vegas)
{
myVegas = vegas;
int SelectCount = 2; //2 = every other, 3 = every third, 4 = every 4th...
foreach(Track myTrack in myVegas.Project.Tracks)
{
int currentCount = 2; // This line will actually determine which event to start with
foreach(TrackEvent evnt in myTrack.Events)
{
evnt.Selected = false;
if (currentCount == 1)
{
evnt.Selected = true;
}
currentCount++;
if (currentCount > SelectCount)
{
currentCount = 1;
}
}
}
}
}
}
public class EntryPoint
{
public void FromVegas(Vegas vegas)
{
Test_Script.Class1 test = new Test_Script.Class1();
test.Main(vegas);
}
}
Please tell me how I can do that.