Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Tab delimited files to Comp Marker

  • Tab delimited files to Comp Marker

    Posted by Ad Narayan on November 27, 2018 at 9:28 pm

    Hey guys,

    Attempting to create a script that grabs info from a Tab Delimited File and create comp markers.

    I’ve got the bones of my script working, however I’m not sure how to select which “column” or “tab” of the delimited file to grab for info.

    I need it to grab information from column 2, add it to a variable called TC, then grab information from column 4, and add it to a variable called comm.

    And do this until end of file essentially.

    My loop looks something like this:

    var tc;
    var comm;
    while (!tdlFile.eof){
    tc = tdlFile.readln(); // Not sure if this right to read tc? Column 2
    comm = tdlFile.readIn(); // Not sure if this is right to read comment? Column 4
    if (tc == "") tc = 1 ; // if tc is blank, then change tc to 1 second
    myComp.markerProperty.setValueAtTime(tc, comm) // unsure if this is actually how to add a comp marker.
    }

    Lead VFX and Motion Design at Tomorrowland NZ

    Ad Narayan replied 7 years, 8 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    November 27, 2018 at 10:11 pm

    I’m sure this isn’t exactly right, but it will be something like this:


    var myMarkerVal = new MarkerValue("");
    var myLine;
    var tabChar = String.fromCharCode(9);
    var mySplitLine;
    var temp;
    var tc;

    while (!tdlFile.eof){
    myLine = tdlFile.readln();
    mySplitLine = myLine.split(tabChar);
    temp = mySplitLine[1];
    tc = (temp == "" ? 1 : parseFloat(temp));
    myMarkerVal.comment = mySplitLine[3];
    myComp.markerProperty.setValueAtTime(tc, myMarkerVal);
    }

    Dan

  • Ad Narayan

    November 27, 2018 at 11:36 pm

    Thank you so much! So close!

    I’ve tweaked it and the only error I’m getting at the moment is that the tc variable is NaN, because of course it is in HH:MM:SS:FF. So need to do a timestamp to frames conversion before calling it.

    Lead VFX and Motion Design at Tomorrowland NZ

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