-
launch script eval(file.read()) palette or dialog
So I have two scripts. One that opens the other.
So I open this script.
var w = new Window("palette","script",undefined);var btn = w.add("button",undefined,"Lauch");
var file = new File("~/Desktop/test.jsx");
btn.onClick = function(){
if(!file.exists){
alert("WRONG LOCATIONS")
}
file.open("r");
eval(file.read());
file.close();
}w.show();
Nothing special. Then I click the button and it opens the below script.
var w = new Window("dialog","script",undefined);var btn = w.add("button",undefined,"TEST");
w.show();
Now if I use “dialog”, works fine. If I change it to palette. Not fine…Anyone know why this is? And how I can use “palette”.