Where to start? (noob question)

Steve Mann wrote on 7/6/2011, 7:29 PM
I was a programmer for 25-years, so I should be able to pick up scripting. I've written code in FORTRAN, TPL, assembler and mostly in VB. I never could get into C, so I am looking at JS scripts.

Here's my noob question.

JS scripts start with:

import System;
import System.IO;
import System.Windows.Forms;
import Sony.Vegas;

Where is this documented?

I know that I can just start with existing scripts, and I have the API which lists every function known to Vegas, but where is "Scripting 101"? I don't want to just copy existing work, I want to know *why* scripts are built as they are.

Comments

altarvic wrote on 7/6/2011, 8:37 PM
Sony Vegas scripting API is based on Microsoft .NET Framework (it is a HUGE library) You can write scripts in any language supported by .NET (JScript .NET, C#, VB.NET...)
johnmeyer wrote on 7/7/2011, 11:35 AM
Don't forget to download the SDK:

Vegas Pro 10.0 Script Developers Kit

This has lots of information that you'll need.
Steve Mann wrote on 7/8/2011, 7:18 PM
Like I said, I already have the API which is in the SDK. I was hoping to avoid the learning curve of .net, so I will likely start from existing scripts.
JohnnyRoy wrote on 7/9/2011, 8:49 PM
Steve, You should really work in C# and use Visual Studio even if it's the free version. The reason is that Visual Studio will give you syntax assist so that you can simply type your variable name and then a period and then Ctrl+J and all of the method calls for that class will be listed. This will save you hours and hours of looking things up in the API. You can also run code in the debugger and that will also save you lots of time.

The SDK does have VegasScriptFAQ.html which gives your some of the "why's" about how things work. There is no Script 101 because there is no market for it. I had wanted to write a book years ago but couldn't find a publisher because you could probably count the number of sales on one hand.

The best thing is to look at the examples in the SDK and understand why they work the way they do. Most of the examples are in C# which is also why I say to work in C#. JavaScript is not type safe and difficult to debug. C# is really the way to go.

You can always ask questions here. ;-)

~jr
Kimberly wrote on 7/10/2011, 10:13 AM
Some other noob questions . . .

I want to understand more about scripts. I've been following the HD to SD rendering discussion (http://www.sonycreativesoftware.com/forums/ShowMessage.asp?ForumID=4&MessageID=769923) involving scripts.

Does AVIsynth use C#?

AVIsynth and scripts sounds like another way to apply FX to video or render video in a manner not available in the Vegas interface. Is this a true statement?

@JR -- you may be surprised at your Scripts 101 market. People get all kinds of things published these days in downloaded content.