Scripting Color Range Command getting output values?
I am currently trying to script the color range command, to allow one pass to effect the next. Specically with midtones which have three input values (fuzziness, midtonesLowerLimit and midtonesUpperLimit).
How do i get these values from the command??
I have a sucessfully extracted the color range command from script listener and am able to input values. However i am really struggling to get values from it.
I know i need to use the executeActionGet command, but havent a clue how to implement it,
Here is my script for which allows me to input values, could someone show me how to get values from the last run command.
function colorRange(fuzz, lowLim, highLim){
var idClrR = charIDToTypeID( "ClrR" );
var desc25 = new ActionDescriptor();
var idClrs = charIDToTypeID( "Clrs" );
var idClrs = charIDToTypeID( "Clrs" );
var idMdtn = charIDToTypeID( "Mdtn" );
desc25.putEnumerated( idClrs, idClrs, idMdtn );
var idmidtonesFuzziness = stringIDToTypeID( "midtonesFuzziness" );
desc25.putInteger( idmidtonesFuzziness, fuzz );
var idmidtonesLowerLimit = stringIDToTypeID( "midtonesLowerLimit" );
desc25.putInteger( idmidtonesLowerLimit, lowLim );
var idmidtonesUpperLimit = stringIDToTypeID( "midtonesUpperLimit" );
desc25.putInteger( idmidtonesUpperLimit, highLim );
var idcolorModel = stringIDToTypeID( "colorModel" );
desc25.putInteger( idcolorModel, 1 );
var iddimension = stringIDToTypeID( "dimension" );
desc25.putInteger( iddimension, 5 );
var idposGaussClusters = stringIDToTypeID( "posGaussClusters" );
desc25.putInteger( idposGaussClusters, 7 );
var idposGaussTolerance = stringIDToTypeID( "posGaussTolerance" );
desc25.putDouble( idposGaussTolerance, 0.156860 );
var idposSpaGaussTolerance = stringIDToTypeID( "posSpaGaussTolerance" );
desc25.putDouble( idposSpaGaussTolerance, 1.000000 );
var idposGaussParams = stringIDToTypeID( "posGaussParams" );
var list4 = new ActionList();
list4.putDouble( 0.428589 );
list4.putDouble( 0.497375 );
list4.putDouble( 0.156860 );
list4.putDouble( 0.502930 );
list4.putDouble( 0.506165 );
list4.putDouble( 0.051764 );
list4.putDouble( 0.403625 );
list4.putDouble( 0.424194 );
list4.putDouble( 0.051764 );
list4.putDouble( 0.019958 );
list4.putDouble( 0.194580 );
list4.putDouble( 1.000000 );
list4.putDouble( 0.580566 );
list4.putDouble( 0.620026 );
list4.putDouble( 1.000000 );
list4.putDouble( 0.567047 );
list4.putDouble( 0.717468 );
list4.putDouble( 0.156860 );
list4.putDouble( 0.499817 );
list4.putDouble( 0.505768 );
list4.putDouble( 0.051764 );
list4.putDouble( 0.432800 );
list4.putDouble( 0.439209 );
list4.putDouble( 0.051764 );
list4.putDouble( 0.532990 );
list4.putDouble( 0.976837 );
list4.putDouble( 1.000000 );
list4.putDouble( 0.233734 );
list4.putDouble( 0.343140 );
list4.putDouble( 1.000000 );
list4.putDouble( 0.670044 );
list4.putDouble( 0.721954 );
list4.putDouble( 0.156860 );
list4.putDouble( 0.505585 );
list4.putDouble( 0.508148 );
list4.putDouble( 0.051764 );
list4.putDouble( 0.472900 );
list4.putDouble( 0.483490 );
list4.putDouble( 0.051764 );
list4.putDouble( 0.503265 );
list4.putDouble( 0.517212 );
list4.putDouble( 1.000000 );
list4.putDouble( 0.264252 );
list4.putDouble( 0.287903 );
list4.putDouble( 1.000000 );
list4.putDouble( 0.298706 );
list4.putDouble( 0.419098 );
list4.putDouble( 0.156860 );
list4.putDouble( 0.510773 );
list4.putDouble( 0.513092 );
list4.putDouble( 0.051764 );
list4.putDouble( 0.454529 );
list4.putDouble( 0.460144 );
list4.putDouble( 0.051764 );
list4.putDouble( 0.428070 );
list4.putDouble( 0.448059 );
list4.putDouble( 1.000000 );
list4.putDouble( 0.398102 );
list4.putDouble( 0.478302 );
list4.putDouble( 1.000000 );
list4.putDouble( 0.338715 );
list4.putDouble( 0.344269 );
list4.putDouble( 0.156860 );
list4.putDouble( 0.510834 );
list4.putDouble( 0.511780 );
list4.putDouble( 0.051764 );
list4.putDouble( 0.410767 );
list4.putDouble( 0.413818 );
list4.putDouble( 0.051764 );
list4.putDouble( 0.025757 );
list4.putDouble( 0.049683 );
list4.putDouble( 1.000000 );
list4.putDouble( 0.446991 );
list4.putDouble( 0.480408 );
list4.putDouble( 1.000000 );
list4.putDouble( 0.572021 );
list4.putDouble( 0.673645 );
list4.putDouble( 0.156860 );
list4.putDouble( 0.501099 );
list4.putDouble( 0.513885 );
list4.putDouble( 0.051764 );
list4.putDouble( 0.407074 );
list4.putDouble( 0.516449 );
list4.putDouble( 0.051764 );
list4.putDouble( 0.010254 );
list4.putDouble( 0.384949 );
list4.putDouble( 1.000000 );
list4.putDouble( 0.285797 );
list4.putDouble( 0.643158 );
list4.putDouble( 1.000000 );
list4.putDouble( 0.614441 );
list4.putDouble( 0.631012 );
list4.putDouble( 0.156860 );
list4.putDouble( 0.521301 );
list4.putDouble( 0.521576 );
list4.putDouble( 0.051764 );
list4.putDouble( 0.517761 );
list4.putDouble( 0.525024 );
list4.putDouble( 0.051764 );
list4.putDouble( 0.356018 );
list4.putDouble( 0.367859 );
list4.putDouble( 1.000000 );
list4.putDouble( 0.292389 );
list4.putDouble( 0.302124 );
list4.putDouble( 1.000000 );
desc25.putList( idposGaussParams, list4 );
var idnegGaussClusters = stringIDToTypeID( "negGaussClusters" );
desc25.putInteger( idnegGaussClusters, 0 );
var idnegGaussTolerance = stringIDToTypeID( "negGaussTolerance" );
desc25.putDouble( idnegGaussTolerance, 0.086273 );
var idnegSpaGaussTolerance = stringIDToTypeID( "negSpaGaussTolerance" );
desc25.putDouble( idnegSpaGaussTolerance, 1.000000 );
var idnegGaussParams = stringIDToTypeID( "negGaussParams" );
var list5 = new ActionList();
desc25.putList( idnegGaussParams, list5 );
executeAction( idClrR, desc25, DialogModes.NO );
}
