Yes, missed that in the documentation. Darn it!
I always use the runtime documentation: app.reflect.methods or app.reflect.properties
app could be any object, activeDocument, activeLayer, etc.
I want to place on the form 2 button to select the color for foreground and background. This function -
app.showColorPicker() - assigns a color only the foreground. How to do so she could assign the same color and the background? Or which function changes colors (by analogy with the X button)
The code below is the same as pressing x to exchange the foreground and background.
var desc = new ActionDescriptor(); var ref = new ActionReference(); ref.putProperty( charIDToTypeID('Clr '), charIDToTypeID('Clrs') ); desc.putReference( charIDToTypeID('null'), ref); executeAction( charIDToTypeID('Exch'), desc, DialogModes.NO );