Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Loop missing last iteration

  • Loop missing last iteration

    Posted by Rodrigo Aben on July 15, 2020 at 5:13 am

    I’m trying to store file paths in a single array and code works fine except it misses the last iteration every time. Index seems right to me. Is there something wrong?

    var myProj = app.project;

    var myAssetspath = [];

    for (var i = 1; i < myProj.numItems; i++) {
    var filesPath = app.project.item(i).file.fsName.replace(app.project.item(i).file.name, "").toString();
    myAssetspath.push(filesPath);
    }

    alert(myAssetspath);

    Filip Vandueren replied 5 years, 10 months ago 2 Members · 1 Reply
  • 1 Reply

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