Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Scripting
Viewing all articles
Browse latest Browse all 12244

Save as - make active document name

$
0
0

Does anyone know how to script a save new filename with Javascript for Photoshop?

I can save the file with a new name but it doesn't replace the current active document that it's saving from. The current active document still possesses the old name.

 

 

    saveFile = new File(filePath()+"/"+fileName())

    saveOptions = new PhotoshopSaveOptions();

    saveOptions.layers = true; // Preserve layers.

    saveOptions.embedColorProfile = true; // Preserve color profile.

    saveOptions.annotations = true; // Preserve annonations.

    saveOptions.alphaChannels = true; // Preserve alpha channels.

    saveOptions.spotColors = true; // Preserve spot colors. 

 

 

    app.activeDocument.saveAs(saveFile, saveOptions, true,Extension.LOWERCASE);

    $.writeln(saveFile);


Viewing all articles
Browse latest Browse all 12244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>