Page 1 of 1

Script eval() stopped working

Posted: January 2nd, 2013, 7:47 pm
by byronnash
I have a palette that has a button to run a script. The location of the script is stored in the preferences. I had this working the other day, but now it's not executing the other script. Does this look correct?

Code: Select all

			myWindow.myPanel.runButton.onClick = function () {

				alert("Running :" +ST.scriptFile);
				var sFile = new File(ST.scriptFile);
				sFile.open("r");
				eval(sFile.read());
				sFile.close();

			}
The path that comes up in the alert box is valid. I'm not sure why it's not running when the button is clicked.