Sony 6 Welding System User Manual


 
364
USING SCRIPTING CHP. 20
Adding scripts to the Scripting menu
When you start the program, Vegas software looks at the Script Menu folder in the Vegas program folder to
determine which scripts appear in the Scripting submenu. This folder is
c:\Program Files\Sony\Vegas 6.0\Script
Menu
by default.
1.
Add or delete scripts in the Script Menu folder to change the contents of the submenu.
Note:
To prevent duplication of script files, you can use
shortcuts in the Script Menu folder.
2.
From the Tools menu, choose Scripting, and then choose Rescan Script Menu Folder to update the menu.
Creating a script
The Microsoft .NET framework is used for scripting. You can write scripts in JScript or Visual Basic .NET.
For more information on JScript®, see
http://msdn.microsoft.com/library/en-us/jscript7/html/jsoriJScript.asp.
For more information on Visual Basic® .NET, see
http://msdn.microsoft.com/library/en-us/vbcn7/html/vaconProgrammingWithVB.asp.
Editing an existing script
All you need to edit a script is a simple text editor (and a working knowledge of JScript or Visual Basic .NET
scripting). The scripts that are included are fully commented to help you find and edit the parameters you
need.
1.
Create a copy of the script (.vb or .js) file you want to edit, assigning a descriptive name to the copy.
2.
Open the new copy of the script in your text editor.
3.
Edit the script as needed. The comments in the script will help you find the parameters you need to edit.
Comments are indicated with double forward slashes: //.
For example, the AddEffectToAllMedia.js script includes the following lines:
// This is the full name of the effect plug-in you want to add.
var plugInName = "Sony Timecode";
// This is the name of the preset you want. Set this to null if you
// want the default preset.
var presetName = "SMPTE Drop (29.97 fps)";
The default script applies the Sony Timecode plug-in to all video media in your project using the SMPTE
Drop (29.97 fps) preset. If you wanted to apply the Broadcast Colors plug-in’s Extremely Conservative -
7.5 Setup preset to all audio media, you could edit the script as follows (changes appear in red):
// This is the full name of the effect plug-in you want to add.
var plugInName = "Sony Broadcast Colors";