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

Any way of capturing warnings/errors from endSuppressDialogs ? (app.open())

$
0
0

I have some .aep files which may generate one or more warnings upon opening, but I also want to be able to react to these warnings from the script.

 

E.g. when I open this one project, I get 2 warnings:

 

  1. "this project must be converted from version 11.0.4 (Macintosh 64). The original file will be unchanged"
  2. "The following layer dependencies are missing: (font references)"

 

The script goes something like:

 

var projectPath = "D:\\path\\to\\project.aep";

app.project.close(CloseOptions.DO_NOT_SAVE_CHANGES);

try

{

    app.beginSuppressDialogs(); // otherwise it will wait for UI interaction

    app.open(new File(projectPath));

}

catch (err)

{

    // this will hit if the file does not exist etc

    console.log("oops, something happened: " + err.message);

}

finally

{

    app.endSuppressDialogs(false); // if true it will show an alert (2), about the missing deps

}

 

Is there any way of retrieving these warnings? It would make more sense if app.endSuppressDialogs(false) actually returned the warnings, but it just returns null.


Viewing all articles
Browse latest Browse all 2143

Trending Articles



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