Quba
I cracked it, this will work.
You’ll have to adapt to get it to work for yourself. I just wanted it to alert an object in my Json to make sure it worked.
var w = new Window(“palette”,”Test”,undefined,{resizeable:true});
var btn2 = w.add(“button”,undefined,”submit”);
var file = app.project.selection[0].file;
file.open(“r”);
var jsonString = file.read();
file.close();
var Obj = JSON.parse(jsonString);
btn2.onClick = function(){
alert(Obj.Name);
};
w.show();
Mathias helped me, but it didn’t like eval, but using JSON.parse fixed it.
So. After all that. Yes it can be done.