Script to move cursor position a certain amount of seconds ahead/back?

itsMohak wrote on 6/8/2017, 2:51 PM

Hey guys

I'm a Vegas Pro 13 user. I edit quite a lot while zoomed in deep into the timeline and have a need to jump ahead/back by certain time (like a few seconds) while zoomed in. According to my research on Internet, there's no shortcut for this, however scripts can be written for that purpose. But the problem is I don't know anything about Vegas pro Scripting.

1.Can anyone please write this small script for me.
2. How should I save the script? Create a notepad file with script in it & change the extension to ".cs"?
3. Will this script be compatible with Vegas Pro 14 if I decide to upgrade?

Thanks a lot

Comments

itsMohak wrote on 6/9/2017, 5:57 AM

Researched more about it and found the solution, here, in the answer by Melanie Steinberg:

http://www.designstudioschool.com/shortcuts-t54239.html

This might help anyone in need of moving ahead or back with time. Lol, I kinda solved my own problem. Here is the script with minor changes from it:
 

//Copyright - John Meyer 2008

import System;
import System.IO;
import System.Windows.Forms;
import Sony.Vegas;
try {   
    // Change the variable below to change cursor advance
    var Advance : Timecode = new Timecode("00:00:02:00");
    Vegas.Cursor = Vegas.Cursor + Advance;
    var wshShell = new ActiveXObject("WScript.Shell");
    wshShell.SendKeys("\\");
}

catch (e) {MessageBox.Show(e); }
  • You can change value in timecode to suit your need.
  • The file needs to be stored in .js format
  • Change "Vegas.Cursor = Vegas.Cursor + Advance;" to "Vegas.Cursor = Vegas.Cursor - Advance;" to move back.
  • By searching more on the internet I also found a way to center the timeline around cursor, after moving by using "SendKeys()" function provided "\" is the shortcut for centering the cursor around timeline.