how to create a color picker with extendscript
Hi, I'm trying to analyze the following code for creating a simple dialog window with 2 black icon buttons.
These buttons call the color picker and selecting a new color the button should change its color with the new one.
The problem is that the button changes its color only when you move the mouse pointer over the button.
I would like to understand how to modify this code in order to change the button color when I confirm the new color through the color picker.
The original code is a script for Photoshop so I've just replaced the app.refresh() command with w.update() but maybe it is not necessary.
Please help me.
try replace you colorpicker() function with this one:
and the onClick callbacks for buttons by this:
It should work, but beware, there are a few bugs with ScriptUI and onDraw now (in CC2014 and later i think).
It Works!!! thank you very much for your support!