AH ChainS - actions & script linker CS / CS2

Upload Photoshop Scripts, download Photoshop Scripts, Discussion and Support of Photoshop Scripts

Moderators: Tom, Kukurykus

Andrew

AH ChainS - actions & script linker CS / CS2

Post by Andrew »

This script allows you to chain together a series of actions and scripts - creating a new script. I primarily wrote the script in order to allow people to run complex action + script chains through my new Script Launch Batch processor.



In the example I am creating a new script called mychain1.js which will run Image Processor.jsx first, Action testa from Action Set test1 second, and ah-jpg.js third.

The new script is written to Photoshop CS2/Presets/Scripts or equivalent. After you have created the script you will have to restart Photoshop in order to have it appear in the scripts menu (though it is immediately acessible to AH Script Launch).

The newly created script mychain1.js looks like this:

Code: Select allah_ChainThis();
function ah_ChainThis() {
   try {eval(ahl_FileAsString (File("/c/Program Files/Adobe/Adobe Photoshop CS2/Presets/Scripts/Dr. Browns Image Processor 2.0.js")));}
   catch (e){if (!confirm(e+'\n\nScript Error\nDo You Wish To Continue')) return;}
   try{doAction('testa','test1');}
   catch (e){if (!confirm('Action Error or Action Cancelled\nDo You Wish To Continue')) return;}
   try {eval(ahl_FileAsString (File("/c/Program Files/Adobe/Adobe Photoshop CS2/Presets/Scripts/ah-jpg.js")));}
   catch (e){if (!confirm(e+'\n\nScript Error\nDo You Wish To Continue')) return;}
   function ahl_FileAsString (f){
      if (f.open('r')) {var lsString = f.read(); return lsString;}
      else alert('failed to read target file' + f.fullName);
   }
}

Andrew
Andrew

AH ChainS - actions & script linker CS / CS2

Post by Andrew »

I've released a new version (added to previous post) which contains some minor bug-fixes

Andrew