Comments

john_dennis wrote on 2/17/2026, 8:24 PM

Robert Johnston wrote on 2/17/2026, 10:21 PM

@WHE, @john_dennis

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;
                            }
            }
        }
             }
         }            
    }  
}

 

Intel Core i7 10700K CPU @ 3.80GHz (to 4.65GHz), NVIDIA GeForce RTX 2060 SUPER 8GBytes. Memory 32 GBytes DDR4. Also Intel UHD Graphics 630. Mainboard: Dell Inc. PCI-Express 3.0 (8.0 GT/s) Comet Lake. Bench CPU Multi Thread: 5500.5 per CPU-Z.

Vegas Pro 21.0 (Build 108) with Mocha Vegas

Windows 11 not pro