$.evalFile execut the old script and the new one
Hello,
I build an extension to run script from its path, and i use $.evalFile("path/to/script") to do that, the idea is to find the right script depend on which button has been clicked, the problem is when i click on the first button, its script runs normally, but when i click on the second button the first script run and the second script also, then when i click on the third button, the two old scripts run and the new one also ... i don't know if Photoshop save the script on the cache or what's the problem, here's a snapshot on my code:
var targetScriptPath = "path/to/script.jsx";
var targetScript = new File(targetScriptPath);
if (targetScript.exists) {
try {
$.evalFile(targetScript);
} catch (error) {
alert(error);
}
} else {
alert( "Missing Script File");
}
Any one can help me please?
Thanks on advance!