Help with Script

wwaag wrote on 4/1/2013, 5:16 PM
I found a simple script written by Rosebud to create groups for events on the first 2 tracks. However, I can't get it to work in V12 or V9 for that matter. Please help. Thanks.

wwaag


/**
* Group Track1 and Track2 Events
* Ce script groupe les Events des deux premières pistes
* Auteur Gilles Pialat 09/01/2008
* http://www.cameravideo.net/forum/sony-vegas-dvd-architect/
**/

using System;
using Sony.Vegas;

class EntryPoint
{
public void FromVegas(Vegas vegas)
{
for (int i=0; i< vegas.Project.Tracks[0].Events.Count; i++)
{
TrackEventGroup group = new TrackEventGroup();;
vegas.Project.Groups.Add(group);
group.Add(vegas.Project.Tracks[0].Events[i]);
group.Add(vegas.Project.Tracks[1].Events[i]);

}

}

}


AKA the HappyOtter at https://tools4vegas.com/. System 1: Intel i7-8700k with HD 630 graphics plus an Nvidia RTX4070 graphics card. System 2: Intel i7-3770k with HD 4000 graphics plus an AMD RX550 graphics card. System 3: Laptop. Dell Inspiron Plus 16. Intel i7-11800H, Intel Graphics. Current cameras include Panasonic FZ2500, GoPro Hero11 and Hero8 Black plus a myriad of smartPhone, pocket cameras, video cameras and film cameras going back to the original Nikon S.

Comments

Rosebud wrote on 4/1/2013, 6:06 PM
Make sure to save the script with a CS extension.
In addition, the script don't check the tracks and events number (at least two tracks and the same events number on each tracks).
wwaag wrote on 4/1/2013, 7:30 PM
Thanks so much for your prompt reply. My mistake--I used a js rather than cs extension. Works well.

Would it be difficult to modify the script to create groups for only regions and selected tracks?

wwaag

AKA the HappyOtter at https://tools4vegas.com/. System 1: Intel i7-8700k with HD 630 graphics plus an Nvidia RTX4070 graphics card. System 2: Intel i7-3770k with HD 4000 graphics plus an AMD RX550 graphics card. System 3: Laptop. Dell Inspiron Plus 16. Intel i7-11800H, Intel Graphics. Current cameras include Panasonic FZ2500, GoPro Hero11 and Hero8 Black plus a myriad of smartPhone, pocket cameras, video cameras and film cameras going back to the original Nikon S.