How can I detect if a save operation is in progress in Photoshop?
I have a script to save JPGs and I'd like to implement an IF statement before to start saving a new JPG.
If Photoshop is busy saving any file, wait, else save the new JPG.
Something like this:
function save(){
var jpegSaveOptions = new JPEGSaveOptions( );
jpegSaveOptions.embedColorProfile = true;
jpegSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
jpegSaveOptions.matte = MatteType.NONE;
jpegSaveOptions.quality = 10;
docRef.convertProfile("Adobe RGB (1998)", Intent.RELATIVECOLORIMETRIC);
docRef.saveAs( finalJpg, jpegSaveOptions, true, Extension.LOWERCASE);
};
if (there is a document being saved){
wait;
} else {
save();
}
Any thoughts?
