app.executeMenuCommand() problems
I'm using AI CC 2017 and it has been brought to my attention that my app.executeMenuCommand("doc-color-cmyk"); doesn't work some times when my script is ran.
#target illustrator
function test(){
var doc = app.activeDocument;
app.executeMenuCommand("doc-color-rgb");
app.redraw();
};
test();
I tested the above snippet and sure enough, nothing happens.
Then, I went to the menu item and hovered over it to reveal the CMYK/RGB menu items in the document color space (without choosing one even), and it now works.
Is this the same thing that's happening with the Actions not registering the recorded scripts menu items?
It is not acceptable when they have to show this item, however rare it might be!
I went by with actions for this purpose, but having this come up was a rather unwelcome 'surprise'.
