Script request

CDM wrote on 8/28/2005, 12:01 PM
Hi -
I think this should be a simple one. I need a script that adds a marker at the current cursor location with a name (specified within the script) (I would edit in the label for the marker). This is so I can have aperson drop in commanoly named markers throughout a project without typing it in eachtime. I would then give the script a toolbar button and hotkey.

thansk in advacne.

Comments

jetdv wrote on 8/28/2005, 2:05 PM
Are you talking Command Markers? Or regular Markers?

See if this can be modified to do what you want (you might want to e-mail me with more details):


/**
* This script will put a command marker at the beginning of the selected event with a specified name
*
* CMarkerAtCursor.js
*
* Written By: Edward Troxel
* Copyright 2005 - JETDV Scripts
* Created: 08-28-2005
**/

import System.Windows.Forms;
import Sony.Vegas;


try {
//Now add and name the marker
var MyMarker = new CommandMarker(Vegas.Cursor, new MarkerCommandType("TEXT"), "Command Marker Text");
Vegas.Project.CommandMarkers.Add(MyMarker);
MyMarker.Label = "NAME OF MARKER"; //Change this line to change the text of the marker


} catch (e) {
MessageBox.Show(e);
}

CDM wrote on 8/29/2005, 9:11 AM
Thanks for your help. Actually, this did the trick: (From Paul at Sony)

import Sony.Vegas;
Vegas.Project.Markers.Add(new Marker(Vegas.Cursor, "Your label text"));

sorry I wasn't more clear.