Hopefully I did not understand the question completely wrong.
var aDoc = app.activeDocument; var ColourMode = aDoc.mode; alert( ColourMode );
I'm afraid I'm doing something different.
I can test the document mode - but the <enable-info> tag checks whether the script (appearing in the Filter or Automate menu) is enabled or grayed out depending on the conditional it expresses.
• The strings must be valid XML syntax. The "&" character will not work for example. Use the && for example to get logical ‘&&’ in the enableinfo block.
Sometimes Photoshop scripting is kind of a treasure hunt you've to look for hints!
Thanks Mikaeru, I'll give that a try!