[jsx] app.doScript synchronous / callback / event?
Dear all,
I'm calling a node script from an inDesign script via app.doScript + applescript, works like a charm. Now i'm trying to find a way to let inDesign wait for the node stuff to complete and continue with returned values:
var response = app.doScript("tell application \"Terminal\" do script with command \"node\" script.js [...]");
// wait for async js to finish...
alert(response);
I'm pretty new to InDesign scripting and was thinking about something like a with-callback-version of doScript or an event, but didn't find anything.
Is it possible?
Thank you very much!
cheers