Shortcuts for Copy and Selectively Paste Event Attributes Via Script.

Thiago_Sase wrote on 3/8/2025, 12:59 PM

Hi everyone, this is a simple script that can be useful to someone like is usable for me. Actually, both are shortcuts to use the native Vegas options to copy the event's attributes and to paste Selectively Paste Event Attributes, via Script. I used .ahk files and compile them to .exe. Just copy both files to the script menu folder of your Vegas version and that's it.

P.S: Password for the rar. file: 123

This is the link for both files, the .cs and .exe;

https://drive.google.com/drive/folders/1abNUzf9IpAlWJc6sqXK6ZsXuI06cn4l3?usp=sharing

And this is the code for the Copy Attributes Shortcut;

using System;
using System.IO;
using System.Diagnostics;
using System.Windows.Forms;
using ScriptPortal.Vegas;

namespace VegasScript
{
    public class EntryPoint
    {
        public void FromVegas(Vegas vegas)
        {
            string vegasDirectory = FindVegasProDirectory();
            
            if (vegasDirectory != null)
            {
                string scriptPath = Path.Combine(vegasDirectory, "Script Menu", "CopyAttributes.exe");
                Process.Start(scriptPath);
            }
            else
            {
                MessageBox.Show("VEGAS Pro installation not found.");
            }
        }

        private string FindVegasProDirectory()
        {
            string[] vegasVersions = { "22.0", "21.0", "20.0", "19.0", "18.0", "17.0", "16.0" };
            foreach (string version in vegasVersions)
            {
                string vegasPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "VEGAS", "VEGAS Pro " + version);
                if (Directory.Exists(vegasPath))
                {
                    return vegasPath;
                }
            }
            return null;
        }
    }
}

And this is the code for the Selectively Paste Event Attributes Shortcut;

using System;
using System.IO;
using System.Diagnostics;
using System.Windows.Forms;
using ScriptPortal.Vegas;

namespace VegasScript
{
    public class EntryPoint
    {
        public void FromVegas(Vegas vegas)
        {
            string vegasDirectory = FindVegasProDirectory();
            
            if (vegasDirectory != null)
            {
                string scriptPath = Path.Combine(vegasDirectory, "Script Menu", "SelectivelyPasteEventAttributes.exe");
                Process.Start(scriptPath);
            }
            else
            {
                MessageBox.Show("VEGAS Pro installation not found.");
            }
        }

        private string FindVegasProDirectory()
        {
            string[] vegasVersions = { "22.0", "21.0", "20.0", "19.0", "18.0", "17.0", "16.0" };
            foreach (string version in vegasVersions)
            {
                string vegasPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "VEGAS", "VEGAS Pro " + version);
                if (Directory.Exists(vegasPath))
                {
                    return vegasPath;
                }
            }
            return null;
        }
    }
}

And this is the ahk. / .exe code for the Copy Attributes Shortcut;

Send, ^c  ; Sends Ctrl+C

And this is the ahk. / .exe code for the Selectively Paste Event Attributes Shortcut;

Send, !es{Down}{Down}{Enter}

 

Comments

Steve_Rhoden wrote on 3/8/2025, 9:01 PM

@Thiago_Sase Sorry, tried these scripts, but keeps giving me an error... Here it is:

Thiago_Sase wrote on 3/8/2025, 9:46 PM

@Steve_Rhoden Did you put the .cs and the .exe files in the same default script menu folder in C:\Program Files\VEGAS\VEGAS Pro your version\Script Menu\????

You need to put the 4 files there.

zzzzzz9125 wrote on 3/8/2025, 11:17 PM

@Steve_Rhoden Did you put the .cs and the .exe files in the same default script menu folder in C:\Program Files\VEGAS\VEGAS Pro your version\Script Menu\????

You need to put the 4 files there.

@Steve_Rhoden @Thiago_Sase

Instead of:

        private string FindVegasProDirectory()
        {
            string[] vegasVersions = { "22.0", "21.0", "20.0", "19.0", "18.0", "17.0", "16.0" };
            foreach (string version in vegasVersions)
            {
                string vegasPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "VEGAS", "VEGAS Pro " + version);
                if (Directory.Exists(vegasPath))
                {
                    return vegasPath;
                }
            }
            return null;
        }

just use:

using System.IO;
using System.Diagnostics;
using System.Windows.Forms;
using ScriptPortal.Vegas;

namespace VegasScript
{
    public class EntryPoint
    {
        public void FromVegas(Vegas vegas)
        {
            string exePath = Path.Combine(Path.GetDirectoryName(Script.File), "CopyAttributes.exe");
            
            if (File.Exists(exePath))
            {
                Process.Start(exePath);
            }
            else
            {
                MessageBox.Show("Exe not found.");
            }
        }
    }
}

 

I was just going to say why not just attach a keyboard shortcut to "Selectively Paste Event Attributes", and then I realized that it doesn't exist in "Customize Keyboard"... Users just have to use it that way.

Last changed by zzzzzz9125 on 3/8/2025, 11:44 PM, changed a total of 4 times.

Using VEGAS Pro 22 build 248 & VEGAS Pro 21 build 208.

Information about my PC:
Brand Name: HP VICTUS Laptop
System: Windows 11.0 (64-bit) 10.00.22631
CPU: 12th Gen Intel(R) Core(TM) i7-12700H
GPU: NVIDIA GeForce RTX 3050 Laptop GPU
GPU Driver: NVIDIA Studio Driver 560.70

zzzzzz9125 wrote on 3/8/2025, 11:35 PM

And your script gave me some inspiration. I'm actually writing a paste-based extension as well. It allows you to directly "paste" some of the contents in your clipboard: text, images, SRT files, media files, etc. It binds the "import" entirely to just one key.

My extension is going to incorporate your approach as well, to implement "Selectively Paste Event Attributes" that cannot be fully achieved by scripts. It may not be finished and released until next week, so you'll need to wait a while...

Here's the open source link to it: https://github.com/zzzzzz9125/UltraPaste

Using VEGAS Pro 22 build 248 & VEGAS Pro 21 build 208.

Information about my PC:
Brand Name: HP VICTUS Laptop
System: Windows 11.0 (64-bit) 10.00.22631
CPU: 12th Gen Intel(R) Core(TM) i7-12700H
GPU: NVIDIA GeForce RTX 3050 Laptop GPU
GPU Driver: NVIDIA Studio Driver 560.70

Thiago_Sase wrote on 3/10/2025, 9:41 AM

@zzzzzz9125 Indeed, that make the code cleaner and shorter, thank you. And, it's very nice to know that somehow my simple script gave to you some inspiration. Thanks for that too. And, for sure, I'll give a look at your extension.

Last changed by Thiago_Sase on 3/10/2025, 9:42 AM, changed a total of 1 times.

OS: Windows 10 22H2
CPU: Intel Core I7 12700
MEMORY: 32GB DDR4 3200MHz
GHAPHIC CARD: RTX 3060 8GB
HARD DRIVES: SSD for System and M.2 for Media Files

m3lquixd wrote on 3/11/2025, 6:50 AM


@Thiago_Sase Why is there this multicam file inside the .rar?

About me:
Hi! Melqui Calheiros Here. I've been using Vegas as my only video editor for over 10 years. I edit professionally for various influencers, public bodies and small businesses. My goal is to squeeze Vegas to the fullest! And end the prejudice that software has here in Brazil.

⬇️ Some of my jobs. ⬇️
https://www.vegascreativesoftware.info/us/forum/post-your-vegas-creations--109464/?page=37#ca872169

PC Specs:
Operating System:
    Windows 11 Pro 64-bit
CPU:
    AMD Ryzen 7 5700G 3.80 GHz
RAM:
    32,0GB Dual-Channel DDR4 3200MHz
Motherboard:
    ASRock B450M Steel Legend (AM4)
Graphics:
    MSI RTX 4060 Ventus 2X Black OC 8GB
Storage:
    476GB ADATA SU650 (SATA (SSD))
    931GB KINGSTON SNV2S1000G (SATA-2 (SSD))

Thiago_Sase wrote on 3/11/2025, 7:07 AM

@m3lquixd Because it is an Autohotkey command compiled into an .exe file. It emulates the shortcut. You need to copy all the 4 files to the script menu folder of your Vegas version. Please, download again, I updated the code with some adjustments as @zzzzzz9125 pointed out.