Automatize 'Fit to' and 'Auto Fit'
A procedure I do over and over is right-clicking on a clothing item and selecting 'Fit Cloth_name to...'. then the 'Fit to' dialog box appears. When I press Accept, the second dialog box 'Auto-Fit' automatically appear, which I complete manually again.
I'd rather like to automate this. What I do is iterate through the scene and get the DzNode's that derives from DzFigure.
var Prop = node.findProperty("Fit to");
Prop.setValue(targetFigure);
the code above makes 'Fit to' dialog box to run automatically, but then the second one appears and I have to fill it out manually
I asked Chat GPT and it gave me the following, but it's useless
var s = new DzSettings();
// first dialog "Fit To"
s.setStringValue("figureLabel", targetFigure.getLabel());
s.setBoolValue("parentToTarget", false);// second dialog "Auto-Fit"
s.setStringValue("autoFitClone", "G8F_A_Pose");
s.setStringValue("autoFitTemplate", "Full-Body");
var Prop = node.findProperty("Fit to");
Prop.setValueFromSettings(s, "Standard");

Comments
Instead of finding property "Fit to" and setting it, you should be using setFollowTarget()
As to the rest, this question has been asked before, and I don't think a solution has been found...
https://www.daz3d.com/forums/discussion/411106/control-the-tiggered-dialog-using-script-get-dialog-manager
https://www.daz3d.com/forums/discussion/714831/fit-to-script