How to use script to set clone Stamp Tool options?
I tried to use the following code, but it didn't work
var r = new ActionReference();
r.putProperty(stringIDToTypeID("property"), stringIDToTypeID("tool"));
r.putEnumerated(stringIDToTypeID("application"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum"));
var options = executeActionGet(r).getObjectValue(stringIDToTypeID("currentToolOptions"));
var d1 = new ActionDescriptor();
d1.putBoolean(charIDToTypeID('Algd'), true);
options.putObject(stringIDToTypeID("cloneStampTool"), stringIDToTypeID("cloneStampTool"), d1);
var r = new ActionReference();
r.putClass(stringIDToTypeID("cloneStampTool"));
var d = new ActionDescriptor();
d.putReference(stringIDToTypeID("null"), r);
d.putObject(stringIDToTypeID("to"), stringIDToTypeID("null"), options);
executeAction(stringIDToTypeID("set"), d, DialogModes.NO);