Gary James wrote on 9/18/2014, 2:51 PM
There's far more to it than simply 'Learning how to write scripts".

(1) First off, scripts are computer programs written in one of a few computer programming languages. If you are already a competent programmer in C# or Javascript then you can proceed to step #2.

(2) Learn the Vegas Pro Programming API. Scripts are nothing more than programs that make calls into the Vegas library functions that Vegas itself makes use of through all of its menus and keystrokes. Once you become familiar with the Vegas API, then you'll have to learn how to create the standard template that all scripts follow that allows Vegas to call into you script to run it.
Byron K wrote on 9/18/2014, 3:29 PM
Thanks Gary!
I'm familiar w/ C programming tough I'm not a developer, I've programmed micro processors and wrote small programs for myself. Just wondering if there's a reference of commands and procedure calls someplace.

Also curious if SCS offer classes?
Gary James wrote on 9/18/2014, 5:06 PM
Go to this web page and download the appropriate script developers kit for your version of Vegas Pro. Later versions of Vegas have new API calls that earlier versions don't have. A script written using one of the "newer" API calls can't be run on an older version of Vegas Pro. Scripts are forward compatible, but not backward. My scripts and Extensions are written for Vegas Pro v8.0 so they'll work with any version of Vegas.
wwaag wrote on 9/18/2014, 5:38 PM
I've put together quite a few scripts over the past few years although I'm not a "script writer" from scratch like Gary. My understanding of programming goes all the way back to Fortran and Basic and little beyond. Although not the best way, I've taken the approach of learning from scripts that have already been written. I start with what I want the script to do, search for existing scripts that do similar things or at least have a similar process, and then learn enough to make changes. There are lots of free Vegas scripts that have been written over the years--just search. And if you get stuck, you can post your problem on the Vegas Pro scripting forum and usually get the help you need. Again, this is NOT the best approach, but it does work. Just my nickels worth.


AKA the HappyOtter at System 1: Intel i7-8700k with HD 630 graphics plus an Nvidia RTX4070 graphics card. System 2: Intel i7-3770k with HD 4000 graphics plus an AMD RX550 graphics card. System 3: Laptop. Dell Inspiron Plus 16. Intel i7-11800H, Intel Graphics. Current cameras include Panasonic FZ2500, GoPro Hero11 and Hero8 Black plus a myriad of smartPhone, pocket cameras, video cameras and film cameras going back to the original Nikon S.

jetdv wrote on 9/19/2014, 11:05 AM
I also have quite a bit of scripting information on my site at
johnmeyer wrote on 9/19/2014, 12:31 PM
1. Go to this page that has links to all things Vegas:

Vegas Video Links

2. Download and study the API: Script SDK, including API

3. Copy/paste code from existing scripts to build your own. Start with something simple.

I have about 100 scripts that I've written or downloaded (about 50/50 of each). If you send me a PM, I'd be happy to send them to you. They are all freely available, if you just go to the scripting forum or to Ed's site, but I have them all in one place.
Byron K wrote on 9/19/2014, 1:34 PM
Thank you guys, I'll definitely check out those links.
skosh wrote on 9/19/2014, 9:20 PM
I just recently started to play around with scripts myself and the suggestions above are spot on. One thing that I'd add is that it is useful to download the free version of Visual Studio or SharpDevelop as it provides code completion which aids in getting a grasp of the API besides studying source samples or the 500k+ API HTML help file. Has the API not changed at all since 2010? What would be helpful are examples in the help file itself along with samples to demonstrate how things are put together with some basic examples however it seems the trend is here is the API and if your are skilled enough you will figure it out. Just publishing an API without samples shows no interest in using resources that could easily provide folks getting familiar to write scripts. Sure some scripts exist in the script folder however not intended for teaching folks the API. What would be nice is if the script forum had a pinned post with samples. The best option would be samples in the API help but I doubt that will happen.

When I start with a new language or API I try to create very basic projects to get a feel for things. For example try to write a script that loops through all the track(s) in a veg and display the name in a message box. Then expand on that.. Get a feel for things and build on that. I was interested in the OFXEffect class and wanted to change values and was able to loop through all the effects and change values for various types. (double,2d, string, choice, boolean, and RGB).
I noticed with the RGB parameter that only r/g/b is available. Can the 2 dropdowns be accessed as well? (HSV, HSL, RGB,Lab) and the drop down to the right. Not trying to hijack the thread but imagine that someone whose posted knows the answer.

All the best with scripting and hopefully the API files are updated.