Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Script check if the item selected is a folder

  • Script check if the item selected is a folder

    Posted by Martin Jean-sébastien on July 8, 2015 at 9:13 am

    Hello,
    In one of my script, I need to be sure that the item selected in the project is a folder. I tried :
    if(myItems.item(j) instanceof FolderItem){

    but it does not work.

    Any idea?

    Thanks!

    Dan Ebberts replied 11 years ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    July 8, 2015 at 4:09 pm

    It’s not clear how you defined myItems, but this works for me:


    var myItems = app.project.selection;
    if ((myItems.length) > 0 && (myItems[0] instanceof FolderItem)){
    alert ("folder selected");
    }

    Dan

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