m = thisLayer.marker; //layer where the markers is n = 0; if (m.numKeys > 0){ n = m.nearestKey(time).index; if (m.key(n).time > time) n--; if (n == m.numKeys){ // after last marker t = thisComp.duration - m.key(n).time; c = m.key(n).comment; }else if (n == 0){ // before first marker t = m.key(1).time; c = ""; }else{ //between two markers t = m.key(n+1).time - m.key(n).time; c = m.key(n).comment; } }else{ // no markers t = thisComp.duration; c = ""; } c + "r" + timeToTimecode(t)