app.executeMenuCommand("Find Fill Color menu item") not working?
Sorry if this is obvious, I'm more accustomed to ID scripting. I am changing the default fill of an open EPS document in CMYK color profile, and attempting to select path items with that default fill applied. When I run the script, I see the default fill color change in the app, but nothing is selected. If I then go to "Select >> Same >> Fill Color" all of the path items I want are selected. Am I calling the wrong menu command? Any help would be appreciated.
var changeColor = function(doc) {
doc.selection = null;
var cmykCol = getColor([73, 0, 99, 0], "aGreen");
doc.defaultFillColor = cmykCol;
app.executeMenuCommand("Find Fill Color menu item");
app.redraw();
$.writeln(doc.selection.length) //returns 0
}

