I want to create a script that inserts media into a track.
How would I do this.
Below I have the start of my script.
It opens a directory and adds all the files to the media pool.
I also figured that I would have to create a video track.
But now how do I insert the media into the video track?
Some SIMPLE samples would be nice.
-----------------------
import System.Windows.Forms;
import SonicFoundry.Vegas;
try {
var fso, f, f1, fc, s;
// Vegas.Project(0,0);
// vegas.project.mediapool();
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.GetFolder("C:\\Documents and Settings\\dcornewell\\My Documents\\My Pictures\\pics\\");
fc = new Enumerator(f.files);
var track = new VideoTrack();
Vegas.Project.Tracks.Add(track);
for (; !fc.atEnd(); fc.moveNext())
{
//MessageBox.Show(fc.item());
var med = new Media(fc.item());
// Vegas.Project.MediaBin.Add(med);
}
} catch (e) {
MessageBox.Show(e);
}
How would I do this.
Below I have the start of my script.
It opens a directory and adds all the files to the media pool.
I also figured that I would have to create a video track.
But now how do I insert the media into the video track?
Some SIMPLE samples would be nice.
-----------------------
import System.Windows.Forms;
import SonicFoundry.Vegas;
try {
var fso, f, f1, fc, s;
// Vegas.Project(0,0);
// vegas.project.mediapool();
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.GetFolder("C:\\Documents and Settings\\dcornewell\\My Documents\\My Pictures\\pics\\");
fc = new Enumerator(f.files);
var track = new VideoTrack();
Vegas.Project.Tracks.Add(track);
for (; !fc.atEnd(); fc.moveNext())
{
//MessageBox.Show(fc.item());
var med = new Media(fc.item());
// Vegas.Project.MediaBin.Add(med);
}
} catch (e) {
MessageBox.Show(e);
}