Copy link to clipboard
Copied
Hi!
This is the code for checking if the render is done. I run it throught ESTK (After Effects) and wait when the render stops. But the problem is when I run it through ESTK (chosen ExtendScript Toolkit CC) it works fine: when the script starts, it writes true values in the console. BUT if I run it throught AE (chosen Adobe After Effects 2020) it just catch only the first "callback", only the first value of "isBatchRunning()". If I pause or stop the render, nothing happens, only the first value of "result" is displayed in the console. What am I doing wrong? Thanks!
var isRendering = true;
var myResult;
var bt = new BridgeTalk();
bt.target = "ame-14.0";
bt.body = "app.getEncoderHost().isBatchRunning()";
function infoFromAME() {
bt.onResult = function(msg){
resultFunction(msg.body)
}
bt.send();
}
function resultFunction (result){
myResult = result;
}
while (isRendering) {
infoFromAME()
if (myResult == "true"){
$.writeln('render is in progress');
}
else {
$.writeln('render is done');
}
}
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Odd. We'll have a look.
Copy link to clipboard
Copied
When the connection is ESTK <--> script host, the messages seem to come back just fine.
When the connection is ESTK --> interim host --> BridgeTalk target, I don't think messages get returned appropriately.
Copy link to clipboard
Copied
Thank you!
Can't imagine how to do the next task with ESTK:
Copy link to clipboard
Copied
Hrrmmnnn...
Not sure how you'd do that, without scripting AME directly, before and after adding your render job (so you know which ones were new/added), and getting render status from AME directly...