Wrong syntax again
Hello, this time I have a problem with replacing the path to the file with var.
i get path from my main.js
var csInterface = new CSInterface();
var extensionRoot = csInterface.getSystemPath(SystemPath.EXTENSION) + "/jsx/custom.jsx";
csInterface.evalScript("selectedPath('" + extensionRoot + "')");
In hostscript.jsx :
function selectedPath(extensionRoot) {
pathOK = extensionRoot;
alert(pathOK);
}
alert
= C:/Program Files (x86)/Common Files/Adobe/CEP/extensions/PREPRESS_2019/jsx/custom.jsx
And this hostscript.jsx work:
function selectedPath(extensionRoot) {
pathOK = extensionRoot;
alert(pathOK);
}
#include 'C:/Program Files (x86)/Common Files/Adobe/CEP/extensions/PREPRESS_2019/jsx/custom.jsx'
and this one does not:
function selectedPath(extensionRoot) {
pathOK = extensionRoot;
alert(pathOK);
}
#include pathOK;
How to change it to work ?
