Set the cmykPolicy and rgbPolicy to something other than ColorSettingsPolicy.COLOR_POLICY_OFF...
No. In app.colorSettings.
just doing some work on colorSettings and my research brought me to that old thread here.
As it seems nothing changed with colorSettings up to the latest version of InDesign CC 2017.
You were saying:
this wok fine but if colour settings are set to "Emulate ADobe Indesign 2.0 CMS Off" I get this message:
How can I avoid this?
That's easy. Simply enable color management before doing anything with other properties like cmsSettingsPath etc.pp:
app.colorSettings.enableColorManagement = true;
FWIW: app.colorSettings.cmsSettings will never return a string like "Emulate Adobe Indesign 2.0 CMS Off".
Instead an error is thrown. The one we are seeing in your screenshot. That is reflecting the key string "$ID/kEmulateCMSOff".
So if you want to do a regular alert showing the right locale you could do:
alert( app.translateKeyString("$ID/kEmulateCMSOff") );
For example with my German InDesign that would be translated to:
"Simulieren: Adobe InDesign 2.0 CMS deaktiviert"