Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Create Markers from External File.

  • Create Markers from External File.

  • Henri Yates

    October 21, 2021 at 10:17 pm

    Hello…

    I was wondering if there was a script or a way to create markers with comment retrieved from an external .txt file?

    It would pick the first line from the text file and use it first marker’s comment and the second line as the second marker’s comment and so on. It could place all markers one the same or each on its own layer (text, null, adjustment layer etc.).

    Thanks.

  • Andrei Popa

    October 22, 2021 at 7:11 pm

    You need some more information, as the time for each marker. IDK of such a script but it would not be that hard to do one. Here is one that puts a marker from your file at each second

    var myFile = File.openDialog("Please select markers file");

    putMarkers(myFile);

    function putMarkers(myFile) {

    var markers = [];

    if (myFile.open("r")) {

    var fileString = myFile.read();

    markers = fileString.split("\n");

    myFile.close();

    } else {

    alert(myFile.error);

    }

    for (var i = 0; i < markers.length; i++) {

    addMarker(app.project.activeItem.selectedLayers[0], markers[i], i + 1);

    }

    function addMarker(myLayer, comment, time) {

    var myMarker = new MarkerValue(comment);

    myLayer("Marker").setValueAtTime(time, myMarker);

    }

    }

Viewing 1 - 2 of 2 posts

Log in to reply.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy