I have written a couple of simple .JSX scripts that automate some common monkeywork I do in Photoshop.
I wrote the scripts in ExtendScriptToolkit and then execute them with File > Scripts > Browse
and select the script I want. This runs the script and does what I want it to but it also launches ExtendScriptToolkit again each time. I have passed the script to a few others at work and they have all asked me to fix this so that the script executes purely within Photoshop but I can’t make it work.
Basically, how can I run the script from Photoshop without it launching the script editor as well?
Cheers in advance for your help
2
Answers
Check your script for
$.writeln()
statements. This could be a problem. You can also suppress debugging by setting the debug level.Taken from the Object Model Viewer in ESTK
Edit:
I tried the debug level with the script above. It still opens the ESTK ๐
Looks like it does not work. Can anybody confirm this?
“The current debugging level, which enables or disables the JavaScript
debugger. Read only.” Page 217
But when script run from ESTK $.level == 1
When from APP $.level == 0
ะnd solution may be
if ($.level) $.writeln("JSC");