// Copyright 2007 // Written by Jeffrey Tranberry // Photoshop for Geeks Version 1.0 /* Description: This script demonstrates how to get the document name, and strip off the extension */ // 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(); /////////////////////////// // SET-UP // /////////////////////////// // get document name as a string alert(activeDocument.name); // get document name as a string and // slice of the .ext alert(activeDocument.name.slice(0,-4)); //get layer name as a string alert (activeDocument.activeLayer.name);