I'm a bit obsessive about automating stuff, so a big bugbear of mine has been the lack of support for "Save for Web" in Photoshop actions (particularly when it comes to picking which folder images go to).
With moving to Lightroom and wanting to supply watermarked images for my clients to use on the web, I decided to have another go at this. With Lightroom's support for droplets on export, all I needed was an action that could save and close the currently open file ... with Save for Web.
The only way to do it is with a script. Here's what I put together:
// saveForWeb.jsx
// (c) 2008 one fine day photography
// ofdphoto.com
//
// $Id$
//
// WARNING: this script deletes and replaces the currently open file.
// For good measure, it also closes it.
//
var options = new ExportOptionsSaveForWeb();
options.format = SaveDocumentType.JPEG;
options.quality = 70;
var doc = app.activeDocument;
var file = new File(doc.fullName.fsName);
file.remove();
doc.exportDocument(file, ExportType.SAVEFORWEB, options);
doc.close(SaveOptions.DONOTSAVECHANGES);
Put this in a file (called, say, saveForWeb.jsx
) and when recording an action, use File > Scripts > Browse... to find and run it. This should be the last step of your action, as it will close the file.Bear in mind that it deletes and overwrites the original file. This is dandy given how droplet-friendly Lightroom is.
Hope it helps somebody. Save for Web makes such a difference to file sizes and quality ...

That sucks. Save for Web must have a different API in PS7.
Glad it helped you.
