How to run synchronous js in jsx?
I'm trying to run a promise in jsx. My current setup is cep to jsx and code executes but I'm trying to add a promise so my code can be synchronous.
Here is a simple example:
var f = new File("/Users/ohms/Desktop/cltemplate.ai");
function setTemplate(f) {
return new Promise((resolve, reject) => {
var doc = app.open (f);
return resolve();
}
);
}
// open the template
setTemplate(f);
This is giving me an error when I run it in extended script toolkit.
Any ideas how I can do this?
