Kommentare

Dexcon schrieb am 05.03.2021 um 13:04 Uhr

Re Vegas Pro shortcuts - no, I don't think so, but your easy resource for this sort of thing in Vegas Pro is Help/Keyboard Shortcuts.

Vegasaur doesn't appear to have this function - something like this doesn't appear under the General menu heading. Somebody with Happy Otter Scripts would know if HOS has this as a function. Others with scripting knowledge would be able to comment re scripting.

Cameras: Sony FDR-AX100E; GoPro Hero 11 Black Creator Edition

Installed: Vegas Pro 15, 16, 17, 18, 19, 20, 21 & 22, HitFilm Pro 2021.3, DaVinci Resolve Studio 19.0.3, BCC 2025, Mocha Pro 2025.0, NBFX TotalFX 7, Neat NR, DVD Architect 6.0, MAGIX Travel Maps, Sound Forge Pro 16, SpectraLayers Pro 11, iZotope RX11 Advanced and many other iZ plugins, Vegasaur 4.0

Windows 11

Dell Alienware Aurora 11:

10th Gen Intel i9 10900KF - 10 cores (20 threads) - 3.7 to 5.3 GHz

NVIDIA GeForce RTX 2080 SUPER 8GB GDDR6 - liquid cooled

64GB RAM - Dual Channel HyperX FURY DDR4 XMP at 3200MHz

C drive: 2TB Samsung 990 PCIe 4.0 NVMe M.2 PCIe SSD

D: drive: 4TB Samsung 870 SATA SSD (used for media for editing current projects)

E: drive: 2TB Samsung 870 SATA SSD

F: drive: 6TB WD 7200 rpm Black HDD 3.5"

Dell Ultrasharp 32" 4K Color Calibrated Monitor

 

LAPTOP:

Dell Inspiron 5310 EVO 13.3"

i5-11320H CPU

C Drive: 1TB Corsair Gen4 NVMe M.2 2230 SSD (upgraded from the original 500 GB SSD)

Monitor is 2560 x 1600 @ 60 Hz

Ustik schrieb am 05.03.2021 um 13:09 Uhr

Re Vegas Pro shortcuts - no, I don't think so, but your easy resource for this sort of thing in Vegas Pro is Help/Keyboard Shortcuts.

Vegasaur doesn't appear to have this function - something like this doesn't appear under the General menu heading. Somebody with Happy Otter Scripts would know if HOS has this as a function. Others with scripting knowledge would be able to comment re scripting.

I found an old reply from @Marco. here: https://www.vegascreativesoftware.info/us/forum/vegas-feature-request-move-event-to-end--121450/#ca756510

There is some kind of script, but the link is dead now...

Marco. schrieb am 05.03.2021 um 13:22 Uhr

The link to this macro (provided in a later comment) still works.

Dexcon schrieb am 05.03.2021 um 13:22 Uhr

I just tried Ctrl+E in VP18 - it opens SoundForge Pro even on an audio-less media generated event. I imagine that it may have been different with the script.

Zuletzt geändert von Dexcon am 05.03.2021, 13:23, insgesamt 1-mal geändert.

Cameras: Sony FDR-AX100E; GoPro Hero 11 Black Creator Edition

Installed: Vegas Pro 15, 16, 17, 18, 19, 20, 21 & 22, HitFilm Pro 2021.3, DaVinci Resolve Studio 19.0.3, BCC 2025, Mocha Pro 2025.0, NBFX TotalFX 7, Neat NR, DVD Architect 6.0, MAGIX Travel Maps, Sound Forge Pro 16, SpectraLayers Pro 11, iZotope RX11 Advanced and many other iZ plugins, Vegasaur 4.0

Windows 11

Dell Alienware Aurora 11:

10th Gen Intel i9 10900KF - 10 cores (20 threads) - 3.7 to 5.3 GHz

NVIDIA GeForce RTX 2080 SUPER 8GB GDDR6 - liquid cooled

64GB RAM - Dual Channel HyperX FURY DDR4 XMP at 3200MHz

C drive: 2TB Samsung 990 PCIe 4.0 NVMe M.2 PCIe SSD

D: drive: 4TB Samsung 870 SATA SSD (used for media for editing current projects)

E: drive: 2TB Samsung 870 SATA SSD

F: drive: 6TB WD 7200 rpm Black HDD 3.5"

Dell Ultrasharp 32" 4K Color Calibrated Monitor

 

LAPTOP:

Dell Inspiron 5310 EVO 13.3"

i5-11320H CPU

C Drive: 1TB Corsair Gen4 NVMe M.2 2230 SSD (upgraded from the original 500 GB SSD)

Monitor is 2560 x 1600 @ 60 Hz

Ustik schrieb am 05.03.2021 um 13:46 Uhr

The link to this macro (provided in a later comment) still works.

Could you please upload AHK script instead of .exe?

Ustik schrieb am 05.03.2021 um 13:51 Uhr

I just tried Ctrl+E in VP18 - it opens SoundForge Pro even on an audio-less media generated event. I imagine that it may have been different with the script.


@Marco. I also tried the compiled AHK script, but ALT+E or CTRL+E doesn't work

walter-i. schrieb am 05.03.2021 um 14:19 Uhr

If that may be helpful to you - I wrote a macro for the Contour Shuttle Pro.
The two shortcuts listed by you do not work for me either.

Ustik schrieb am 05.03.2021 um 15:03 Uhr

If that may be helpful to you - I wrote a macro for the Contour Shuttle Pro.
The two shortcuts listed by you do not work for me either.

Is there any way to return the playhead to the starting position? (I mean the same position where it was before the start of the script)?

walter-i. schrieb am 05.03.2021 um 15:28 Uhr

Is there any way to return the playhead to the starting position? (I mean the same position where it was before the start of the script)?

Unfortunately, I do not know that - but a good question - would interest me too.

jetdv schrieb am 05.03.2021 um 15:49 Uhr

Well, the script would need to find the event and then move it to the end of the timeline. But that should be a fairly simple task... You could use the base project I create here:

http://www.jetdv.com/2021/02/01/what-is-the-minimum-i-need-to-write-a-script-for-vegas/

And then add this code in the "main" section:

            foreach (Track myTrack in myVegas.Project.Tracks)
            {
                foreach (TrackEvent evnt in myTrack.Events)
                {
                    if (evnt.Selected)
                    {
                        evnt.Start = myVegas.Project.Length;
                        evnt.Selected = false;
                    }
                }
            }

 

 

Ustik schrieb am 05.03.2021 um 15:58 Uhr

Well, the script would need to find the event and then move it to the end of the timeline. But that should be a fairly simple task... You could use the base project I create here:

http://www.jetdv.com/2021/02/01/what-is-the-minimum-i-need-to-write-a-script-for-vegas/

And then add this code in the "main" section:

            foreach (Track myTrack in myVegas.Project.Tracks)
            {
                foreach (TrackEvent evnt in myTrack.Events)
                {
                    if (evnt.Selected)
                    {
                        evnt.Start = myVegas.Project.Length;
                        evnt.Selected = false;
                    }
                }
            }

 

 

Edward, it would be great if you can upload the compiled script here.

 

My programming knowledge is far worse than yours to dive into programming :)

jetdv schrieb am 05.03.2021 um 16:19 Uhr

@Ustik, If you go to that link, the base script is downloadable from there. You can copy this text into the "Main" routine in the "Class1.CS" file. Then you can rename and copy the "Class1.CS" file as needed and run that directly in Vegas. The whole thing would look like (name the file something like "MoveSelectedEventsToEndOfProject.cs"):
 

using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using ScriptPortal.Vegas;

namespace Test_Script
{
    public class Class1
    {
        public Vegas myVegas;

        public void Main(Vegas vegas)
        {
            myVegas = vegas;

            foreach (Track myTrack in myVegas.Project.Tracks)
            {
                foreach (TrackEvent evnt in myTrack.Events)
                {
                    if (evnt.Selected)
                    {
                        evnt.Start = myVegas.Project.Length;
                        evnt.Selected = false;
                    }
                }
            }

        }
    }
}

public class EntryPoint
{
    public void FromVegas(Vegas vegas)
    {
        Test_Script.Class1 test = new Test_Script.Class1();
        test.Main(vegas);
    }
}

But it still might be wise to look at the tutorials at www.jetdv.com to see more details about how creating scripts can work.

 

Ustik schrieb am 05.03.2021 um 16:44 Uhr

Thanks a lot, it worked! I added a shortcut to your script and it does exactly what I needed :)

Ustik schrieb am 05.03.2021 um 16:51 Uhr

@Ustik, If you go to that link, the base script is downloadable from there. You can copy this text into the "Main" routine in the "Class1.CS" file. Then you can rename and copy the "Class1.CS" file as needed and run that directly in Vegas. The whole thing would look like (name the file something like "MoveSelectedEventsToEndOfProject.cs"):
 

using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using ScriptPortal.Vegas;

namespace Test_Script
{
    public class Class1
    {
        public Vegas myVegas;

        public void Main(Vegas vegas)
        {
            myVegas = vegas;

            foreach (Track myTrack in myVegas.Project.Tracks)
            {
                foreach (TrackEvent evnt in myTrack.Events)
                {
                    if (evnt.Selected)
                    {
                        evnt.Start = myVegas.Project.Length;
                        evnt.Selected = false;
                    }
                }
            }

        }
    }
}

public class EntryPoint
{
    public void FromVegas(Vegas vegas)
    {
        Test_Script.Class1 test = new Test_Script.Class1();
        test.Main(vegas);
    }
}

But it still might be wise to look at the tutorials at www.jetdv.com to see more details about how creating scripts can work.

 

 

@jetdv

Actually, it moves video and audio individually... Is it possible to move the whole event together? Even when I select both parts they end up unsynced...

jetdv schrieb am 05.03.2021 um 17:14 Uhr

@Ustik, yeah, it moves everything selected "to the end" so the end changes as each piece is moved. That little version is not smart enough to know if there's a linked audio piece to go with the video. This modification will do both assuming the audio starts at the same time and is part of the same file. It's not the most elegant method but will work: so change the text in the "Main" routine to:

            myVegas = vegas;

            Timecode oldStart = null;
            Timecode newStart = null;
            string oldFile = null;
            foreach (Track myTrack in myVegas.Project.Tracks)
            {
                foreach (TrackEvent evnt in myTrack.Events)
                {
                    if (evnt.Selected)
                    {
                        oldStart = evnt.Start;
                        oldFile = evnt.ActiveTake.MediaPath;
                        evnt.Start = myVegas.Project.Length;
                        newStart = evnt.Start;
                        evnt.Selected = false;
                    }
                }

                foreach (TrackEvent evnt in myTrack.Events)
                {
                    if ((evnt.Start == oldStart) && (evnt.ActiveTake.MediaPath == oldFile))
                    {
                        evnt.Start = newStart;
                    }
                }
            }

With the above modification, ONLY select the video portion and the matching audio portion should also be moved. And only select a SINGLE video file - otherwise it will only move the audio for the "last" one as it's still not smart enough to move multiples.

 

Alternately, we could make everything selected move to the current end of the project. However, if you selected two items on the same track, they would both be moved to the same location so the above code is probably the best option. But here's the other option:
 

            myVegas = vegas;

            Timecode newStart = myVegas.Project.Length;
            foreach (Track myTrack in myVegas.Project.Tracks)
            {
                foreach (TrackEvent evnt in myTrack.Events)
                {
                    if (evnt.Selected)
                    {
                        evnt.Start = newStart;
                        evnt.Selected = false;
                    }
                }
            }

So just use whichever you like best.

Ustik schrieb am 05.03.2021 um 21:02 Uhr

@Ustik, yeah, it moves everything selected "to the end" so the end changes as each piece is moved. That little version is not smart enough to know if there's a linked audio piece to go with the video. This modification will do both assuming the audio starts at the same time and is part of the same file. It's not the most elegant method but will work: so change the text in the "Main" routine to:

            myVegas = vegas;

            Timecode oldStart = null;
            Timecode newStart = null;
            string oldFile = null;
            foreach (Track myTrack in myVegas.Project.Tracks)
            {
                foreach (TrackEvent evnt in myTrack.Events)
                {
                    if (evnt.Selected)
                    {
                        oldStart = evnt.Start;
                        oldFile = evnt.ActiveTake.MediaPath;
                        evnt.Start = myVegas.Project.Length;
                        newStart = evnt.Start;
                        evnt.Selected = false;
                    }
                }

                foreach (TrackEvent evnt in myTrack.Events)
                {
                    if ((evnt.Start == oldStart) && (evnt.ActiveTake.MediaPath == oldFile))
                    {
                        evnt.Start = newStart;
                    }
                }

With the above modification, ONLY select the video portion and the matching audio portion should also be moved. And only select a SINGLE video file - otherwise it will only move the audio for the "last" one as it's still not smart enough to move multiples.

 

Alternately, we could make everything selected move to the current end of the project. However, if you selected two items on the same track, they would both be moved to the same location so the above code is probably the best option. But here's the other option:
 

            myVegas = vegas;

            Timecode newStart = myVegas.Project.Length;
            foreach (Track myTrack in myVegas.Project.Tracks)
            {
                foreach (TrackEvent evnt in myTrack.Events)
                {
                    if (evnt.Selected)
                    {
                        evnt.Start = newStart;
                        evnt.Selected = false;
                    }
                }
            }

So just use whichever you like best.

This code alone doesn't work... Could you please write the full code needed to be inside .cs file?

 

Now I have this and it gives me an error:

 

using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using ScriptPortal.Vegas;

namespace Test_Script
{
    public class Class1
    {
        public Vegas myVegas;

        public void Main(Vegas vegas)
        {
            myVegas = vegas;

            Timecode oldStart = null;
            Timecode newStart = null;
            string oldFile = null;
            foreach (Track myTrack in myVegas.Project.Tracks)
            {
                foreach (TrackEvent evnt in myTrack.Events)
                {
                    if (evnt.Selected)
                    {
                        oldStart = evnt.Start;
                        oldFile = evnt.ActiveTake.MediaPath;
                        evnt.Start = myVegas.Project.Length;
                        newStart = evnt.Start;
                        evnt.Selected = false;
                    }
                }

                foreach (TrackEvent evnt in myTrack.Events)
                {
                    if ((evnt.Start == oldStart) && (evnt.ActiveTake.MediaPath == oldFile))
                    {
                        evnt.Start = newStart;
                    }
                }

        }
    }
}

public class EntryPoint
{
    public void FromVegas(Vegas vegas)
    {
        Test_Script.Class1 test = new Test_Script.Class1();
        test.Main(vegas);
    }
}

 

jetdv schrieb am 05.03.2021 um 21:47 Uhr

You left out a }

 

using System; 
using System.Collections.Generic; 
using System.Text; 
using System.Windows.Forms; 
using ScriptPortal.Vegas; 

namespace Test_Script 
{     
    public class Class1
    {
         public Vegas myVegas;
         public void Main(Vegas vegas)
         {
             myVegas = vegas;

             Timecode oldStart = null;
             Timecode newStart = null;
             string oldFile = null;

             foreach (Track myTrack in myVegas.Project.Tracks)
             {
                 foreach (TrackEvent evnt in myTrack.Events)
                 {
                     if (evnt.Selected)
                     {
                         oldStart = evnt.Start;
                         oldFile = evnt.ActiveTake.MediaPath;
                         evnt.Start = myVegas.Project.Length;
                         newStart = evnt.Start;
                         evnt.Selected = false;
                     }
                 }

                 foreach (TrackEvent evnt in myTrack.Events)
                 {
                     if ((evnt.Start == oldStart) && (evnt.ActiveTake.MediaPath == oldFile))
                     {
                         evnt.Start = newStart;
                     }
                 }
             }     // <------ This one is missing!
         }
     }
 }

public class EntryPoint 
{
     public void FromVegas(Vegas vegas)
     {
         Test_Script.Class1 test = new Test_Script.Class1();
         test.Main(vegas);
     }
}

Apparently I didn't get the last "}" copied when I pasted above. I will attempt to correct my post above.

 

You have to have the same number of "}" as you do "{". By using the indenting the way I have things indented, you can easily tell which one is missing. If you start at a { and go straight down, you should hit the corresponding }.

Ustik schrieb am 05.03.2021 um 23:41 Uhr

Thanks, Edward! Now it works, you made my day.

jetdv schrieb am 05.03.2021 um 23:50 Uhr

Glad I could help.