What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Reply to thread

Welcome to the forum Nathan.

What you want is easy with a script..

 

[code]

#target Photoshop

app.bringToFront();

main();

function main(){

if(!documents.length) return;

var Name = decodeURI(app.activeDocument.name).replace(/\.[^\.]+$/, '');

try{

var Path = activeDocument.path;

    }catch(err){

        alert("You need to have saved the file before running this script!");

        return;

        }

var saveFile = File(Path + "/" + Name + "_m.jpg");

if(saveFile.exists){

    if ( confirm( "File exists do you want to overwrite it?" ) ) {

        saveFile.remove();

 }else{return;}

    }

SaveJPEG(saveFile,12);

app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);

}

function SaveJPEG(saveFile, jpegQuality){

jpgSaveOptions = new JPEGSaveOptions();

jpgSaveOptions.embedColorProfile = true;

jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;

jpgSaveOptions.matte = MatteType.NONE;

jpgSaveOptions.quality = jpegQuality;

activeDocument.saveAs(saveFile, jpgSaveOptions, true,Extension.LOWERCASE);

}

[/code]

 

Using ExtendScript toolkit (this get installed with Photoshop) copy and paste the code into a new window, then save the script to the applications presets/scripts folder.

if you are using Vista or Windows 7 you will need to save it elsewhere and copy it into the scripts folder, this is due to permissions.

If Photoshop was open close and re-start it so that it can pick up the new script.

You can now create an action to call the script.

Start a new recording allocate a function key, from the action palette fly out menu select " Insert Menu Item" then File - Scripts and select the script.

Stop the recording.

You now have a one key press function to do what you want.


What is our favorite program/app? (Hint - it begins and ends with the letter P)
Back
Top