// Copyright 2007 // Written by Jeffrey Tranberry // Photoshop for Geeks Version 1.0 /* Description: This script demonstrates how to save a file as a JPEG */ // enable double clicking from the // Macintosh Finder or the Windows Explorer #target photoshop // Make Photoshop the frontmost application // in case we double clicked the file app.bringToFront(); /////////////////////////// // MAIN // /////////////////////////// //Save as a JPEG to the users desktop var jpegOptions = new JPEGSaveOptions(); jpegOptions.quality = 10; jpegOptions.embedColorProfile = false; app.activeDocument.saveAs( File( "~/Desktop/" + activeDocument.name.slice(0,-4) + ".jpg" ), jpegOptions );