I'm sure this is trivial but I can't get my head around scripting for Vegas. How can I copy the full path of the selected event either to a text file or to the clipboard? Thanks.
I use the following script to get the Name of the selected event, but I changed the script to get the MediaPath (full path) of the selected event.
/**
Get MediaPath of selected event (take) and copy to clipboard
Rob Johnston
**/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Windows.Forms;
using ScriptPortal.Vegas;
public class EntryPoint
{
Vegas myVegas;
public void FromVegas(Vegas vegas)
{
foreach (Track track in vegas.Project.Tracks)
{
foreach (TrackEvent evnt in track.Events)
{
if (evnt.Selected)
{
foreach (Take take in evnt.Takes)
{
if (take.IsActive)
{
Clipboard.SetText(take.MediaPath);
MessageBox.Show(take.MediaPath);
return;
}
}
}
}
}
}
}