5 Replies Latest reply on May 22, 2016 12:26 PM by mirzaa26404547

    Get active layer name for saving the document

    mirzaa26404547 Level 1



      I am struggling to get rid of this code, actually i am new in scripting i have a script of following:


      1. var bottonLayerName = app.activeDocument.layers[app.activeDocument.layers.length-1].name
      2. var currentDocFolder = app.activeDocument.path;
      3. app.activeDocument.saveAs( new File( currentDocFolder +'/'+ bottonLayerName +'.psd'));


      I just want to change this script to select TOP layer instead of bottom layer name and do not copy in .psd format please help its urgent.


      or any other script that save as jpeg with top layer name...


      Thanks in advance