Comments

Gary James wrote on 8/16/2013, 9:55 AM
By saying "on startup" do you mean when Vegas itself is started? If so, I'm not aware of any technique to run a regular script automatically when Vegas starts.

However, Vegas Extensions ( Add-Ins ) are different. Excalibur, Vegasaur, Ultimate-S, and Timeline Tools are all Vegas Extensions. If any of these were running when Vegas was last shut down, they can automatically be started when Vegas is next started back up.

Unless someone else knows of a way to run a script automatically, I'd say you need to write an Extension instead of a script.
xcx wrote on 8/16/2013, 12:36 PM
I did already noticed that I can't make startup script so I made extension which does run (initialize) on startup and I can write my code in that initialize stage like get my current version control branch or something. However that information is now in scope of that extension and I was unable to find any way to get access to that information outside of the extension itself, like from some script or other extension.
Gary James wrote on 8/16/2013, 3:08 PM
There are two possibilities, although I have to admit I've never tried either. Your Extensions Vegas Object has a RunScriptFile method that will run a script and let you pass arguments to it. Also, the Vegas Object has a FindDockView method that can return a reference to another DockView that may let you communicate between Extensions if you know the other Extensions API.

Again, I haven't tried doing either of these, but it wouldn't hurt to do a little feasibility testing.
xcx wrote on 8/17/2013, 12:32 AM
Thanks, I'll give it a try.
jetdv wrote on 8/17/2013, 8:51 AM
You can run a script automatically upon startup but you have to start Vegas with a batch file or modified shortcut. Here's an entry from a Batch file I used way back in Vegas Pro 4 to automatically start a script named "RenderScript.js":

"c:\Program Files\Sonic Foundry\Vegas 4.0\vegas40.exe" -SCRIPT:"d:\RenderScript.js"
Gary James wrote on 8/17/2013, 12:24 PM
That's good to know. I hadn't even considered that Vegas accepted command line switches.

Thanks Ed.
xcx wrote on 8/19/2013, 12:41 AM
Sweet, thanks.