Hi,  please help me out, I really need this answer.
Is there a way to know which media file is selected in mediapool? The document didn't say there is a "selected" property with media class. But is there any technique to know which one is selected? It will be quite helpful if I can select media in mediapool and use a script to send them to mediapool.
By the way, as a thank you for your time. I got 1 script here. It can deleted all the not active takes, so you can apply media cleanup more effeciently.
/**
* Program: RemoveNotActiveTakes.js
* Description: This script will all the takes that's not active.
* Author: Philip
*
* Date: Oct 30, 2003
**/
import SonicFoundry.Vegas;
import System.Windows.Forms;
import Microsoft.Win32;
try
{
// step through all video events:
for (var track in Vegas.Project.Tracks) {
for (var evnt in track.Events) {
for (var take in evnt.Takes){
if (!take.IsActive)evnt.Takes.Remove(take);
}
}
}
}
catch (errorMsg)
{
MessageBox.Show(errorMsg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
                        
                    
                    
                            Is there a way to know which media file is selected in mediapool? The document didn't say there is a "selected" property with media class. But is there any technique to know which one is selected? It will be quite helpful if I can select media in mediapool and use a script to send them to mediapool.
By the way, as a thank you for your time. I got 1 script here. It can deleted all the not active takes, so you can apply media cleanup more effeciently.
/**
* Program: RemoveNotActiveTakes.js
* Description: This script will all the takes that's not active.
* Author: Philip
*
* Date: Oct 30, 2003
**/
import SonicFoundry.Vegas;
import System.Windows.Forms;
import Microsoft.Win32;
try
{
// step through all video events:
for (var track in Vegas.Project.Tracks) {
for (var evnt in track.Events) {
for (var take in evnt.Takes){
if (!take.IsActive)evnt.Takes.Remove(take);
}
}
}
}
catch (errorMsg)
{
MessageBox.Show(errorMsg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}