Home
Head's Up: I'm in the middle of upgrading my site. Most things are in place, but there are something missing and/or broken including image alt text. Please bear with me while I'm getting things fixed.

Clearing the Adobe ExtendScript ToolKit Console Window

While creating a new JavaScript to automate some day - job Photoshop work, I gave Adobe's ExtendScript Toolkit a spin. It's designed specifically for building scripts for Adobe products and it's pretty nice. Especially the JavaScript Console window that makes it nice and easy to see debugging messages.

By default, this window doesn't clear itself before each run which degrades a lot of its value. It can be cleared manually before the start of each test run, but that's a pain.

The good news is there's a way to do it with code. If the script is run from ExtendScript Toolkit itself, this snippet of code will do it :

javascript
app.clc();
javascript
if (app.name === "ExtendScript Toolkit") { 
  app.clc(); 
}
javascript
if (app.name === "ExtendScript Toolkit") { 
  app.clc(); 
}
else {
  var estApp= BridgeTalk.getSpecifier("estoolkit");
  if(estApp) {
    var bt = new BridgeTalk;
    bt.target = estApp;
    bt.body = "app.clc()";
    bt.send();
  }
}