Surpress 50% Selection Warning Message

I have recorded a bunch of routines with Alchemist and added them to a function which all appears to work as expected.

Does anyone know if its possible to prevent this message showing which is stopping everything from running until the use clicks the OK button.

Did you try

"modalBehavior": "execute"

Instead of

"modalBehavior": "fail"

in your batchplay code already?

Other than that you could try .then after the function that causes that problem.

Would that need to go under the options

"_options": {
            "dialogOptions": "dontDisplay"
         }

The correct syntax would be like so:

      "_options": {
         "dialogOptions": "dontDisplay"
      }
   }
],{
   "synchronousExecution": false,
   "modalBehavior": "execute"
});    

This solution does NOT work on Windows. I’ve not tried it on Mac yet. The message still shows on Windows using the following batchPlay to load the RGB channel as a selection when the RGB channel is showing a very dark mask preview where it would be expected that less than 50% of any pixel would be selected.

 await require('photoshop').action.batchPlay([
 //Load RGB channel as a selection
 { "_obj": "set",
 "_target": [{"_ref": "channel", "_property": "selection"}], 
"to": {"_ref": "channel","_enum": "channel","_value": "RGB"}, 
"_options": { "dialogOptions": "dontDisplay" }}], 
{"synchronousExecution": false, 
"modalBehavior": "execute", 
historyStateInfo: {name: "Load RGB As Selection", target: {_ref: "document", _enum: "ordinal", _value: "targetEnum"}}});

Have you tried removing this part?

"_options": {
            "dialogOptions": "dontDisplay"
         }

Oddly I found taking this bit out can lead to warnings being suppressed.

Have you tried removing this part?

"_options": {
            "dialogOptions": "dontDisplay"
         }

That didn’t make any difference.

Not all errors can be suppressed. In some cases, it has no effect. I reported this one on Oct 4, 2019. Bug ID PS-39051 and its state is “in test”.

If you find more of these please report a bug.

@Fionayu (since you research bug reporting)

1 Like

As the selection alert seems to be the culprit over and over again, they should just remove that annoying warning message from Photoshop. Because it’s just that: annoying for decades. There is no user benefit in that alarm. It’s just useless.

1 Like

Seeing this topic dates back to 2021, can we hope for a solution? Or is it still something we need to find workarounds for? :confused: It’d be great to be able to use selection tools to their full potential in UXP :raised_hands:t2: