Running extendscript (.jsx) launches ExtendscriptToolkit

Issue

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

Solution

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

// $.level   
// Data Type: number 
// Core JavaScript Classes 
// The current debugging level, which enables or disables the JavaScript debugger.
// One of 0 (no debugging), 1 (break on runtime errors), or 2 (full debug mode).

$.level = 0; 
$.writeln("something");
alert("Hello World");

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?

Answered By – fabianmoronzirfas

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published