-
1. Re: Need to export root groups to jpg's
MortenSJ00 Feb 2, 2011 6:14 AM (in response to MortenSJ00)Okay.
I found this script and it works perfectly
#target photoshop function main(){ if(!documents.length) return; var doc = activeDocument; var oldPath = activeDocument.path; for(var a=0;a<doc.layerSets.length;a++){ activeDocument.activeLayer = activeDocument.layers.getByName(doc.layerSets[a].name); dupLayers(); activeDocument.mergeVisibleLayers(); var saveFile= File(oldPath +"/"+doc.layerSets[a].name +".jpg"); SaveJPG(saveFile); app.activeDocument.close(SaveOptions.DONOTSAVECHANGES); } } main(); function dupLayers() { var desc143 = new ActionDescriptor(); var ref73 = new ActionReference(); ref73.putClass( charIDToTypeID('Dcmn') ); desc143.putReference( charIDToTypeID('null'), ref73 ); desc143.putString( charIDToTypeID('Nm '), activeDocument.activeLayer.name ); var ref74 = new ActionReference(); ref74.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') ); desc143.putReference( charIDToTypeID('Usng'), ref74 ); executeAction( charIDToTypeID('Mk '), desc143, DialogModes.NO ); }; function SaveJPG(saveFile){ var jpgOpts = new ExportOptionsSaveForWeb; jpgOpts.format = SaveDocumentType.JPEG jpgOpts.quality = 100; activeDocument.exportDocument(new File(saveFile),ExportType.SAVEFORWEB,jpgOpts); }The thing is that i would like to control the output and some other things
Is it possible to get a window where i can change output path and change the quality and even the format. Ex. png?
-
2. Re: Need to export root groups to jpg's
JJMack Feb 2, 2011 6:50 AM (in response to MortenSJ00)It is possible to program dialogs like that into Photoshop scripts. Photoshop scripting is very powerful it is also programming which requires designing and scripting language skills. Three languages are supported but only javascript is support in both the Mac and Windows enviroments.
-
3. Re: Need to export root groups to jpg's
MortenSJ00 Feb 2, 2011 7:16 AM (in response to JJMack)Thanks alot JJMack
I'm no scripter so this is way out of my league, but if someone would help me get it done i would very much appreaciate it. I can't offer anything at all, so i don't expect people to do actually do it
-
4. Re: Need to export root groups to jpg's
JJMack Feb 2, 2011 8:06 AM (in response to MortenSJ00)MortenSJ00 wrote:
if someone would help me get it done i would very much appreaciate it, I can't offer anything at all
To me this statement seem to be a contradiction. Nonsense.... There are many scripts in this forum with dialogs its a good time to learn some scripting. You seem to have a reason to want too.

