When checking the availability of 'Save for web' incompatible color mode error occurs.
I can check the availability of Save for web option using following script.
app.displayDialogs = DialogModes.NO;
function check_s4w()
{
try {
var d = new ActionDescriptor();
var d1 = new ActionDescriptor();
d1.putEnumerated(charIDToTypeID("Op "), charIDToTypeID("SWOp"), charIDToTypeID("OpRe"));
d.putObject(stringIDToTypeID("using"), stringIDToTypeID("SaveForWeb"), d1);
var ret = executeAction(stringIDToTypeID("export"), d, DialogModes.NO);
return ret.count?true:false;
}
catch (e) { return false; }
}
When the executeAction API is executed in above script, following error message was occurred if the Save for web option is not available.

I want to suppress the occurring above error message.
Even if DialogModes.No argument was given to above executeAction API, above error message was occurred.
Can anyone please help me?
