Save a copy of your original "Layer Comps To Files.jsx" file.
Then
----------------------------------------------
1) In the file, find the lines
// -- now after all the radio buttons
dlgMain.cbIcc = dlgMain.pnlFileType.add("checkbox", undefined, strCheckboxIncludeICCProfile);
dlgMain.cbIcc.value = exportInfo.icc;
dlgMain.cbIcc.alignment = 'left';
//********************************************************
dlgMain.cbLay = dlgMain.pnlFileType.add("checkbox", undefined, "Include Layers");
dlgMain.cbLay.value = exportInfo.layers;
dlgMain.cbLay.alignment = 'left';
//********************************************************
Insert the 3 lines that are between // ******************************************** comments and which are not in the original file
----------------------------------------------
2) In the file, find the lines
// get setting from dialog
exportInfo.destination = dlgMain.etDestination.text;
exportInfo.fileNamePrefix = dlgMain.etFileNamePrefix.text;
exportInfo.selectionOnly = dlgMain.cbSelection.value;
exportInfo.fileType = dlgMain.ddFileType.selection.index;
exportInfo.icc = dlgMain.cbIcc.value;
//********************************************************
exportInfo.layers = dlgMain.cbLay.value;
//********************************************************
Insert the 1 line that is between // ******************************************** comments and which are not in the original file
----------------------------------------------
3) In the file, find the lines
function initExportInfo(exportInfo)
{
exportInfo.destination = new String("");
exportInfo.fileNamePrefix = new String("untitled_");
exportInfo.selectionOnly = false;
exportInfo.fileType = psdIndex;
exportInfo.icc = true;
//*********************************************
exportInfo.layers = true;
//*********************************************
Insert the 1 line that is between // ******************************************** comments and which are not in the original file
----------------------------------------------
4) In the file, find the lines
case psdIndex:
fileExtension = "psd";
var saveFile = new File(exportInfo.destination + "/" + fileNameBody + ".psd");
psdSaveOptions = new PhotoshopSaveOptions();
psdSaveOptions.embedColorProfile = exportInfo.icc;
//*******************************
psdSaveOptions.layers = exportInfo.layers;
//*******************************
docRef.saveAs(saveFile, psdSaveOptions, true, Extension.LOWERCASE);
break;
case tiffIndex:
fileExtension = "tiff";
var saveFile = new File(exportInfo.destination + "/" + fileNameBody + ".tif");
tiffSaveOptions = new TiffSaveOptions();
tiffSaveOptions.embedColorProfile = exportInfo.icc;
//*******************************
tiffSaveOptions.layers = exportInfo.layers;
//*******************************
tiffSaveOptions.imageCompression = exportInfo.tiffCompression;
if (TIFFEncoding.JPEG == exportInfo.tiffCompression) tiffSaveOptions.jpegQuality = exportInfo.tiffJpegQuality;
docRef.saveAs(saveFile, tiffSaveOptions, true, Extension.LOWERCASE);
break;
Insert the 2 lines that are between // ******************************************** comments and which are not in the original file
----------------------------------------------
5) Good luck )