Please advise. How to automate a session from a batch file. We need a way to specify this is an automated session (exit when done) and which script to run.
You can create a batch file that will start Vegas and autostart a script like this:
"c:\Program Files\Sony\Vegas Pro 8.0\vegas80.exe" -SCRIPT:"path to script/script.cs"
At the end of the script, you can tell Vegas to exit:
Vegas.Exit();
However, you'll need to make sure it is "safe" to exit or a dialog will pop up asking you to save the project so you don't lose info. Here's how I've done it in the past:
// Temporarily save the current project and then start a new project.
Vegas.SaveProject(TempSave);
Vegas.NewProject(false, false);
Vegas.UpdateUI();
// Delete the temporary save file
File.Delete(TempSave);