Get feedback from app.showColorPicker(startColor) when someone click Cancel?
This code below works fine, but if in the color picker someone click Cancel instead Ok what app.showColorPicker(startColor) return is not false/undefined or similar but startColor.
Does somone know how to get feedback when cancel is clicked that that is cancel and not startColor?
Code:
var startColor = createCMYK ([1,1,1,1]);
var result = app.showColorPicker(startColor);
$.writeln([result.cyan, result.magenta, result.yellow, result.black])
function createCMYK (inputColors){
var newColor = new CMYKColor();
newColor.cyan = inputColors[0];
newColor.magenta = inputColors[1];
newColor.yellow = inputColors[2];
newColor.black = inputColors[3];
return newColor
}
