Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

openDialog filter fail in ExtendScript

$
0
0

Hi,

 

I used to have a working script but for some reason it's not working anymore on multiple Macs. The problem lies in the the openDialog method's second parameter; filter. This is the script that I use:

 

    #target aftereffects

 

 

    File.openDialog( "prompt", filterFiles, false );   

   

    function filterFiles( file )    {

        try {

            if( file instanceof Folder || file.name.match( /\.aep$/i ) ) {

               return true; 

            }

            else    {

                return false;

            }

         }

        catch( e )  {

           

        }

     }

 

Even though I use a try/catch it yields an uncaught error message and keeps on crashing. Somehow the file paramater of the filterFiles function creates an error. Anyone got a clue what to do?

 

Thanks


Viewing all articles
Browse latest Browse all 2143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>