skip to Main Content

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


  1. 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?

    Login or Signup to reply.
  2. $.level = 0;

    “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");

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search