Copy link to clipboard
Copied
Hello everyone.
Tell me how I can disable the warning " Attention: No pixel is highlighted by more than 50%. The borders of the selected area will not be visible."during the execution of my script?
app.displayDialogs = DialogModes.NO;
Copy link to clipboard
Copied
Try not to make a selection from the path, but turn on the QuickMask mode, fill the path with the desired feather with black (or white depending on the QuickMask mode), turn the QuickMask into a selection.
Bingo! )
UPD. It doesn't seem to work, I was wrong.
UPD2. Although I checked it manually and not with a script. In the script, it might work
Copy link to clipboard
Copied
That's good trick to retrieve original selection. I have for you another puzzle 😄
Fill new created document with 50% grey, then run your 4 steps script.
Enable QuickMask mode, and quit it. What warning do you see? 😛
Ps. you can do it by creating 1x1 pixel selection, enabling QM, filling with 50% opacity to quit it.
Copy link to clipboard
Copied
Try this setting for QuickMask.
In this case, even in manual mode, there are no messages (the 1x1 path must be filled with black and feather 2).
In another mode, there will be a message (if done in manual mode)
Now it is not possible to check different modes using a script.
Copy link to clipboard
Copied
Yes, now it works. But I don't know in what another mode(s) you're talking?
Copy link to clipboard
Copied
This errors with >
This is insane that in 2022 this is still not fixed ;[[[[ !!!!!
Copy link to clipboard
Copied
No problem for me in 23.3 when using this snippet (also with whole code). Attach your file.
Copy link to clipboard
Copied
Hmmm, just tweaked my code now and it started to run. Looks like I had to merge all layers together and then run the routine rather on them splitteed.
Yay!
Also ehhh, this will have a problem when I max out alpha channels count where I won't be able to make any more of them. How will I make my mask then? :- ((((
Copy link to clipboard
Copied
Maybe post some screenshots to let others easier understand what you mean 😉
Copy link to clipboard
Copied
Hey,
@Kukurykus I mean that when user max out alpha channel count >
This script will fail. Thus adobe should fix that warning error :[[[[
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Perhaps you know how to read whether Masked / Selected Areas are checked in Quick Mask Options?
Copy link to clipboard
Copied
if (!app.activeDocument.quickMaskMode) app.activeDocument.quickMaskMode = true;
select_quick_mask();
alert(channel_color_indicates())
function select_quick_mask()
{
try {
var d = new ActionDescriptor();
var r = new ActionReference();
r.putName(stringIDToTypeID("channel"), "Quick Mask");
d.putReference(stringIDToTypeID("null"), r);
executeAction(stringIDToTypeID("select"), d, DialogModes.NO);
var d = new ActionDescriptor();
var r = new ActionReference();
r.putEnumerated(stringIDToTypeID("channel"), stringIDToTypeID("channel"), stringIDToTypeID("RGB"));
d.putReference(stringIDToTypeID("null"), r);
executeAction(stringIDToTypeID("show"), d, DialogModes.NO);
}
catch (e) { throw(e); }
}
function channel_color_indicates()
{
try {
var r = new ActionReference();
r.putProperty(stringIDToTypeID("property"), stringIDToTypeID( "alphaChannelOptions" ) );
r.putEnumerated(stringIDToTypeID("channel"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum"));
var ret = executeActionGet(r).getObjectValue(stringIDToTypeID("alphaChannelOptions")).getEnumerationValue(stringIDToTypeID("colorIndicates"));
if (ret == stringIDToTypeID("selectedAreas")) return true;
return false;
}
catch (e) { throw(e); }
}
Copy link to clipboard
Copied
'alphaChannelOptions', so that was the property I was looking for, thx!