Insert Empty Event script?

Steve_Rhoden wrote on 6/26/2014, 10:24 AM
Obviously there is a Insert empty event function from the insert menu.
But wondering if anyone here knows where i may still can find
an Insert Empty Event script?
Thanks.

Comments

dlion wrote on 6/26/2014, 10:34 AM
highlight an area on the timeline, say 5-sec on a new track. rt-click, choose insert empty event. you have to give it a duration to create it.
Chienworks wrote on 6/26/2014, 10:43 AM
Just curious, but what is it you expect to accomplish with a script that you can't do as easily with with the Insert / Empty event command?
Steve_Rhoden wrote on 6/26/2014, 10:43 AM
Thanks dlion, but i already know all that, its a script specifically that i
would like to get my hands on.
Chienworks, its not about ease of use.
rs170a wrote on 6/26/2014, 11:04 AM
Steve, John Rofrano wrote a script a few years ago that was designed to insert a 2 second gap for audio CDs. I'm sure it could easily be modified.

https://dl.dropboxusercontent.com/u/20488019/Add2SecondGap.js

Mike
Chienworks wrote on 6/26/2014, 11:08 PM
OK, may i ask then what it is about? Just for my own personal curiosity please.
jetdv wrote on 6/27/2014, 11:03 AM
Not sure why you want it but here: AddEmptyEvent.cs


//Script to add images in a directory to a new track

using System;
using System.Collections;
using System.IO;
using System.Text;
using System.Drawing;
using System.Reflection;
using System.Diagnostics;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using Sony.Vegas;

public class EntryPoint
{
Vegas myVegas;
Track myTrack = null;
Timecode myTC = null;
Timecode myLen = null;


public void FromVegas(Vegas vegas)
{
myVegas = vegas;
myTC = myVegas.Transport.CursorPosition;
myLen = new Timecode("00:00:05:00");

//Find the first selected track
foreach (Track atrack in myVegas.Project.Tracks)
{
if (atrack.Selected)
{
myTrack = atrack;
break;
}
}

if (myTrack == null)
{
MessageBox.Show("No Track is selected. Please select a track and try again");
}
else
{
//Add an empty media
if (myTrack.IsVideo())
{
VideoEvent newEvent = new VideoEvent(myTC, myLen);
myTrack.Events.Add(newEvent);
}
else
{
AudioEvent newEvent = new AudioEvent(myTC, myLen);
myTrack.Events.Add(newEvent);
}
}
}


}

Steve_Rhoden wrote on 6/27/2014, 11:31 AM
Thanks Edward, Works beautifully.
You see, as a Professional, there are certain different methods to
me and my team's everyday workflow on different systems that i follow.
Hope that made sense, (smile)
Appreciate it.
ushere wrote on 6/28/2014, 3:19 AM
actually makes no sense ;-)

would love to know as well.....

*maybe i'd learn something that would help my workflow?
Marco. wrote on 6/28/2014, 4:14 AM
I always see a sense in using a script if this means reducing the number of steps necessary to execute a function which I need very often. If it needs two steps to insert an empty event the normal way, but only one single step after I installed a script which gives me the chance to use a clickable icon or a keystroke command, than a script may have fullfilled the wish.
Maybe there are several functions which workflow could be simplified same way. And if there are seven functions like this I use hundred times a day, scripts like this would save 700 steps a day.
Though I need the empty event function once a week only, which don't make me a favorite client for this certain script, I see the value it may have for others.
ushere wrote on 6/28/2014, 5:21 AM
fully agree marco, but what could be quicker than right click insert empty event, or assigning keyboard shortcut?

Marco. wrote on 6/28/2014, 5:39 AM
»Right-click -> Insert Empty Event« needs two steps. The script would only need one.

But you are right. You could also use the given keystroke assignment.
Chienworks wrote on 6/28/2014, 9:28 AM
Although, Steve says it's not about ease of use. So, i'm still curious as to why the script is better in his workflow. It might be nice to get some education. :)
JohnnyRoy wrote on 6/28/2014, 10:42 AM
> "You could also use the given keystroke assignment."

Yea, what's wrong with Alt+I E ?

I'm guessing that the time it takes Vegas to load a script and execute it will be longer than simply pressing Alt+I E. I too don't see the need for the script when it's already a default key sequence. I guess if you are inserting a lot of these in a row, pressing one key instead of two is 50% faster. ;-)

~jr
Steve_Rhoden wrote on 6/28/2014, 7:03 PM
For all of you questioning the necessity of a script, Making ONE click on
a script icon in the toolbar, is Faster than right clicking, then scroll and
then left clicking again.

If someone prefers using a script icon over all other options,
What's the big deal?
What's the mystery in it to find out?
What curiosity can there be?

Scripts exit for ease of use, alternate option for a function, workflow preference
and faster edit route!


ushere wrote on 6/28/2014, 9:53 PM
steve, i don't think anybody had any other thought behind their question other than, will it help ME out?

as it is i think moving from tl to toolbar to click an icon, rather than right click or keyboard shortcut is more time consuming and energy intensive...

however, thank you for explaining your need.