#target photoshop /* // BEGIN__HARVEST_EXCEPTION_ZSTRING TEX Export JPG Save all root folders as JPGs maps^rby leshiy^rartleshiy.com _PlaceAtTopCuzISaidSo_DotA true // END__HARVEST_EXCEPTION_ZSTRING */ function TEX_export() { doc = app.activeDocument; root = Folder( doc.path + "/" + ( doc.name.substr( 0, doc.name.lastIndexOf('.') ) ) ); saveOptions = new JPEGSaveOptions(); saveOptions.matte = MatteType.NONE; saveOptions.quality = 10; saveOptions.formatOptions = FormatOptions.STANDARDBASELINE; // hide all falders var maps = doc.layerSets; var mapsPast = new Array(); for( i = 0; i < (maps.length); i++ ) { mapsPast[i] = maps[i].visible; if ( maps[i].visible ) { targetFile = File( root + "_" + maps[i].name + ".jpg" ); doc.saveAs( targetFile, saveOptions, true, Extension.LOWERCASE ); maps[i].visible = false; } } // RESTORE for( i = 0; i < (maps.length); i++ ) { maps[i].visible = mapsPast[i]; } } TEX_export()