file.open
Hi,
So I have my CEP Html panel working, but discovered in my work place some who install my plugin it goes into a different Library folder.
This works fine if I trigger the jsx file in AE
var thisFile = new File($.fileName);
var basePath = thisFile.path;
var file = new File(basePath + "/test.jsx");
file.open("r");
eval(file.read());
file.close();
However if I do it via the CEP Panel
main.js
var csInterface = new CSInterface;
var button = window.document.getElementById('btna');
button.onclick = function (){
csInterface.evalScript("myBtnone()");
}
MainScript.jsx
function myBtnone(){
var thisFile = new File($.fileName);
var basePath = thisFile.path;
var file = new File(basePath + "/test.jsx");
file.open("r");
eval(file.read());
file.close();
}
it doesn't like it.
I've tried alerting and I get undefined or a number, which doesn't help narrow it down.
Any suggestions would be much appreciated.
