Comments

johnmeyer wrote on 3/22/2004, 5:45 PM
You could easily modify this script:

Highlight selected fX

You would just need to delete the FOR loop in the middle of the script, keeping only this line:

evnt.Selected = true;

The resulting script would select every event on the selected track that lies to the right of the cursor. You could also delete the IF statement that checks if the track is a video track. This way, you could use the script on audio tracks as well.

I think that is all that would need to be changed.
jeff-beardall wrote on 3/22/2004, 5:58 PM
thanks for the quick reply!
i think we're on the right track { as it were ; ) }, but what i need to do is select all the events on all the tracks to the right of cursor placement to the end of the timeline. i am coming from using premiere pro and selecting events on all tracks to the end of the timeline is a simple 'shift' modifier of the 'track select' tool. i really like vegas and want to know if a script can replicate this simple premiere tool.
do you think the script you mentioned be modified to include any all tracks audio and video?
thanks again!
jetdv wrote on 3/22/2004, 6:01 PM
Out of curiosity, what's wrong with Tsunami? As you said, it performs this task very well and is VERY flexible in how it selects.
jeff-beardall wrote on 3/22/2004, 6:18 PM
perhaps i'm not using tsunami properly, but when i assign it to, say, 'ctrl+1', it brings up the tsunami gui pop-up, which means i have to click ok before it executes the chosen script actions. if there is a way to configure tsunami so it just immediately executes the saved 'default' script action (in my case select all events to right of cursor including events under cursor) without bringing up the pop-up, it would be much more useful to me. that is why i was searching for a single script. please excuse my ignorance. i am new to the vegas scripting world! for me, every extra click counts!!
jetdv wrote on 3/22/2004, 6:52 PM
You can also press ENTER instead of clicking. So, you could CTRL-1, ENTER. But, no, there is no way to bypass the GUI.
JohnnyRoy wrote on 3/23/2004, 10:47 PM
This script will what you want:
===== CUT HERE =====
/**
* Program: SelectEventsFromCursor.js
* Description: This script will select all the events on all tracks that are
* under the cursor position and to the right of it.
* Author: Johnny (Roy) Rofrano john_rofrano at hotmail dot com
*
* Date: March 24, 2004
*
**/

import SonicFoundry.Vegas;
import System.Windows.Forms;

try
{
// Step through all the tracks
for (var track in Vegas.Project.Tracks)
{
// Step through all events
for (var evnt in track.Events)
{
// Check to see if event is under or to the right of the cursor
if (-1 == Vegas.Cursor.CompareTo(evnt.Start + evnt.Length))
{
evnt.Selected = true;
}
}
}
}
catch (errorMsg)
{
MessageBox.Show(errorMsg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
===== CUT HERE =====

~jr
jeff-beardall wrote on 3/24/2004, 6:27 AM
Thanks Johnny!
Tell me if I'm doing something wrong though, when I run the script, it kicks back 'error on line 2: expecing more source characters'.
this could be due to my boneheadedness, please excuse!
jetdv wrote on 3/24/2004, 6:30 AM
What's on line 2? You want everything BETWEEN the ==========cut here========== lines.
jeff-beardall wrote on 3/24/2004, 6:40 AM
just figured it out...sorry, i love vegas, i just don;t know jack about scripting...guess i'll learn, eh?
jeff-beardall wrote on 3/24/2004, 6:41 AM
i didn't think line formatting was important, but i guess it is
jeff-beardall wrote on 3/24/2004, 6:41 AM
thanks johnnyroy...you rock...good work!!!
JohnnyRoy wrote on 3/24/2004, 11:05 AM
You’re welcome. I guess I should leave the "=== CUT HERE ===" out and just post the script (sorry). I'm glad you got it to work.

~jr