Question
Trying to run a script that moves the starting time of my markers
Hello I want to move the starting time of all my markers backwards half a second.
Chat GPT came up with this:
// Define the time offset (in seconds) to move the markers
var timeOffset = -0.5; // Half a second backward
// Get the active session
var activeSession = app.activeSession;
// Check if there's an active session
if (activeSession) {
// Get all markers in the active session
var markers = activeSession.markers;
// Iterate through all markers
for (var i = 0; i < markers.numMarkers; i++) {
var marker = markers.getMarker(i);
// Calculate the new position for the marker
var newStartTime = marker.startTime + timeOffset;
// Update the marker's position
marker.startTime = newStartTime;
}
// Refresh the view to see the changes
activeSession.view.refresh();
} else {
alert("No active session found. Please open an audio file in Adobe Audition.");
}
my issue is that i keep getting the message "No active seesionfound. please open an audio file in Adobe Audition." Any suggestions?
