// processAllOpenDocuments.jsx // Copyright 2007 // Written by Jeffrey Tranberry // Photoshop for Geeks Version 1.0 /* Description: This script is a template script that will process all the currently open documents. */ // enable double clicking from the // Macintosh Finder or the Windows Explorer #target photoshop // Make Photoshop the frontmost application // in case we double clicked the file app.bringToFront(); /////////////////////////// // MAIN // /////////////////////////// // Process all open documents until no documents // are left open. while (app.documents.length >=1){ ////////////////////////////////////////// // Put all your processing functions... // ////////////////////////////////////////// // Have Photoshop display an alert box that // displays the document name as a string alert(app.activeDocument.name); // Close, but ask whether to save or not //app.activeDocument.close(); // Close without saving app.activeDocument.close(SaveOptions.DONOTSAVECHANGES); //////////////////////////////////////////////// // ...in the area between these two comments. // ////////////////////////////////////////////////; }