brutalism icon indicating copy to clipboard operation
brutalism copied to clipboard

In InDesign, the built-in utils do not work

Open xh4010 opened this issue 4 years ago • 1 comments

In InDesign, the built-in utils do not work.

Panel.vue loadUtils () -- gehenna() failed to load the built-in utils, because of the CSInterface.evalScript return "" in library [email protected]

tested under PS, evalScript return “undefined”, loadUtils() without error.

You've noticed this problem, [email protected]

async function evalScript(text, defs = {}) {
  if (!isBrowser) {
    let CS_Interface = new CSInterface();
    return new Promise((resolve, reject) => {
      CS_Interface.evalScript(`${text}`, (res) => {
        // For some reason this was returning errors in InDesign alone. No idea why
        resolve(isJson(res) ? JSON.parse(res) : res);
        // if (res) resolve(isJson(res) ? JSON.parse(res) : res);
        // else if (res.length) reject({ error: res });
      });
    });
  } else return defs;
}

But gehenna's dependent library version is still 0.07.

xh4010 avatar Sep 18 '20 02:09 xh4010

Will be looking into this very soon -- don't personally script for IDSN very often and just happened to catch this while doing testing for the themes in IDSN I believe. Let me know if you've already solved it on your end too!

Inventsable avatar Sep 20 '20 07:09 Inventsable