// Copyright 2007 // Written by Jeffrey Tranberry // Photoshop for Geeks Version 1.0 /* Description: This script will pop the "Layer Properties..." dialog. If the user cancels the dialog, don't pop the debugger */ // 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 // /////////////////////////// try { popLayerRename(); } catch (error) { // Don't report user cancelled errors. } /////////////////////////// // FUNCTIONS // /////////////////////////// // function created using the Scripting Listener // to capture an event for "Insert Menu Item..." // for the command Layers>Layer Properties... function popLayerRename(){ var id33300 = charIDToTypeID( "slct" ); var desc4346 = new ActionDescriptor(); var id33301 = charIDToTypeID( "null" ); var ref607 = new ActionReference(); var id33302 = charIDToTypeID( "Mn " ); var id33303 = charIDToTypeID( "MnIt" ); var id33304 = charIDToTypeID( "LyrO" ); ref607.putEnumerated( id33302, id33303, id33304 ); desc4346.putReference( id33301, ref607 ); executeAction( id33300, desc4346, DialogModes.NO ); }