Quote:
Originally Posted by nymusicman
I need a script (unless there is another way to do it) that creates a marker every 3 minutes until the end of a file.
Thanks!
|
Not sure if you want to create marker over selected items or whole project but here's the EEL script that does the whole project:
Code:
function GetEndOfProject (markers, regions)
(
projEnd = 0;
i = 0;
loop (GetNumTracks(),
track = GetTrack(0, i);
item = GetTrackMediaItem(track, GetTrackNumMediaItems(track) - 1);
itemEnd = GetMediaItemInfo_Value(item, "D_POSITION") + GetMediaItemInfo_Value(item, "D_LENGTH");
(itemEnd > projEnd) ? projEnd = itemEnd;
i += 1;
);
(markers || regions) ?
(
i = 0;
while (i = EnumProjectMarkers(i, region, start, end, 0, 0))
(
(regions) ? (region && end > projEnd) ? projEnd = end;
(markers) ? (!region && start > projEnd) ? projEnd = start;
);
);
projEnd;
);
projectEnd = GetEndOfProject(0, 1);
markerPos = 0;
while (markerPos <= projectEnd)
(
AddProjectMarker(0, 0, markerPos, 0, "", -1);
markerPos += 60*3;
);