How to get information about project media?

WHE wrote on 11/3/2022, 8:20 PM

I know a little about scripting for Sound Forge but nothing at all about scripting for Vegas. How would I go about creating a script to send the file names of all mp4 files used in project media either to the clipboard or to a text file? I searched through the scripting forum and found a script from 2003 but it was way too old to work. Are there any modern examples of scripts focusing on project media? Thanks in advance.

Comments

john_dennis wrote on 11/3/2022, 8:42 PM

@WHE

Quite a lot of information is available in the Edit Details window.

 

WHE wrote on 11/3/2022, 9:58 PM

Thanks for the reply, John. Edit details doesn't seem to show the project media. I want to create a list of all media programmatically regardless of whether it is being used or not.

john_dennis wrote on 11/3/2022, 11:03 PM

@WHE

Fixing the old script might be as simple as changing the name space for Magix instead of Sonic Foundry or Sony.

Worth a try.

Look at this: https://www.vegascreativesoftware.info/us/forum/zoom-tools-do-not-work-4me-on-vp19--137814/#ca862082

Also, look here for more help. http://www.jetdv.com/

jetdv wrote on 11/4/2022, 8:57 AM

jetdv wrote on 11/4/2022, 8:58 AM

WHE wrote on 11/4/2022, 9:40 PM

Thanks very much, jetdv. The videos you linked to are interesting but beyond my current needs. I found this video on your website:

And from this came up with the following code:

using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using ScriptPortal.Vegas;namespace ListWavFiles
{
    public class EntryPoint
    {
        public Vegas myVegas;
        public string files = "";
       public void FromVegas(Vegas vegas)
        {
           myVegas = vegas;
         foreach (Media media in myVegas.Project.MediaPool)
         {
            if (media.FilePath.Contains(".wav"))
            files += media.FilePath + Environment.NewLine;
         }
         MessageBox.Show(files);
         System.Windows.Forms.Clipboard.SetText(files);
        }      
    }
}

 

jetdv wrote on 11/5/2022, 8:14 AM

The files I linked to were examples I thought was close to what you were requesting. I would recommend that you start at the beginning on my site as everything builds from the very beginning videos.