Using Vegas Pro 22
I'm trying to generate an SRT file based on the titles within my project. I have a script that does so based on the names of regions, however the names of the titles are NOT the same as the contents of the titles (I.E, a title that displays "Please god help I'm so tired" would be titles VEGAS titles and text)
As such, I've been looking for a script to generate the reigons and name them based on the contents of the title, rather than the name, and found one from Jedtv - as the script itself didn't seem to have a download, I had to copy it off the video manually. I ran into a few errors from me being bad at copying, but once I had (as far as I know) a 1:1 copy of the script, it STILL won't run. The current error I'm getting is:
System.ApplicationException: Failed to create instance of main class: 'EntryPoint'.
at ScriptPortal.Vegas.ScriptHost.ScriptManager.Run(Assembly asm, String className, String methodName)
at ScriptPortal.Vegas.ScriptHost.RunScript(Boolean fCompileOnly)
For context, the code currently looks like this:
using System;
using System.IO;
using System.Text;
using System.Windows.Forms;
using System.Globalization;
using System.Drawing;
using System.Runtime;
using System.Xml;
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)
{
if (myTrack.IsVideo())
{
foreach (VideoEvent Vevnt in myTrack.Events)
{
if (Vevnt.ActiveTake.IsGenerator)
{
Effect gEffect = Vevnt.ActiveTake.Media.Generator;
if (gEffect.PlugIn.UniqueID == "{Svfx:com.vegascreativesoftware:titlesandtext}")
{
OFXEffect ofx = gEffect.OFXEffect;
OFXStringParameter tparm = (OFXStringParameter)ofx.FindParameterByName("Text");
RichTextBox rtfText = new RichTextBox();
rtfText.Rtf = tparm.Value;
string title = rtfText.Text;
ScriptPortal.Vegas.Region newReigon = new ScriptPortal.Vegas.Region(Vevnt.Start, Vevnt.Length, title);
myVegas.Project.Regions.Add(newReigon);
}
}
}
}
}
}
}
}
Really not sure what to do. In the video it seemed he had some extra scripts? And from what I can tell from googling, this error occurs when you're missing a dependency, or haven't set the script up correctly.
Also sorry if the answer is really obvious and I seem like an idiot - this is my first time using Vegas.
