I am trying to change the settings of the current tool.
There are no problems with getting the current settings and changing the object, but I can’t figure out how to write similar code for batchPlay
var d1 = new ActionDescriptor(),
r = new ActionReference();
r.putClass(s2t(currentToolName);
d1.putReference(s2t("target"), r);
d1.putObject(s2t("to"), s2t("currentToolOptions"), currentToolSettingsObj);
executeAction(s2t("set"), d1, DialogModes.NO);