Conditional ICC Profile Test
I have been spinning my wheels trying to get the following code to work:
var doc = app.activeDocument;
if (doc.colorProfileName === "sRGB IEC61966-2.1") {
alert("sRGB = True");
// Do something #1
} else if (doc.colorProfileName !== "sRGB IEC61966-2.1") {
alert("sRGB = False");
// Do something #2
} else {}
alert("Untagged");
// Do something #3
The closest that I have come to for answers are the following topics:
https://community.adobe.com/t5/photoshop/color-profile-conditions/m-p/7734629
https://simulatedesign.com/scripting-color-management-in-photoshop/
That being said, I just can't get the test/check for a doc with no colour management or no ICC profile to fire the alert.
I have tried using four conditionals, with the untagged check being an else if and then adding a blank else at the end, however, the syntax is killing me when it comes to checking for the untagged/don't colour manage this document condition.
var doc = app.activeDocument;
if (doc.colorProfileName === "sRGB IEC61966-2.1") {
alert("sRGB = True");
// Do something #1
} else if (doc.colorProfileName !== "sRGB IEC61966-2.1") {
alert("sRGB = False");
// Do something #2
} else if (doc.colorProfileType === ColorProfile.NONE) {
alert("Untagged");
// Do something #3
} else {}
I'm guessing that I am missing something simple, hoping somebody can help, thanks!

