win = new Window("dialog", "混合选项");
win.orientation = "column";
leftGr = win.add("group");
leftGr.orientation = "column";
baton22 = leftGr.add("group");
Generate1 = baton22.add("button", undefined, "正常");
Generate1.minimumSize.width = 100;
Generate2 = baton22.add("button", undefined, "颜色");
Generate2.minimumSize.width = 100;
Generate3 = baton22.add("button", undefined, "明度");
Generate3.minimumSize.width = 100;
baton222 = leftGr.add("group");
Generate4 = baton222.add("button", undefined, "柔光");
Generate4.minimumSize.width = 100;
Generate5 = baton222.add("button", undefined, "滤色");
Generate5.minimumSize.width = 100;
Generate6 = baton222.add("button", undefined, "删除");
Generate6.minimumSize.width = 100;
sliderGroup44 = leftGr.add("group");
sliderGroup44.alignment = "left";
slTxt2 = sliderGroup44.add("staticText", undefined, "不透明度：");
sliderGroup = leftGr.add("group");
sliderGroup.orientation = "row";
sliderGroup.alignChildren = ["fill", "fill"];
slTxt = sliderGroup.add("staticText", undefined, "0");
slider6 = sliderGroup.add("slider", undefined, 100, 0, 100);
slider6.preferredSize.width = 275;
sliderValue6 = sliderGroup.add("statictext", undefined, "100");
slider6.onChanging = function() {
    sliderValue6.text = Math.round(this.value);
};
slider6.onChange = function() {
    foo66 = Math.round(this.value);
    var idsetd = charIDToTypeID("setd");
    var desc18 = new ActionDescriptor();
    var idnull = charIDToTypeID("null");
    var ref10 = new ActionReference();
    var idLyr = charIDToTypeID("Lyr ");
    var idOrdn = charIDToTypeID("Ordn");
    var idTrgt = charIDToTypeID("Trgt");
    ref10.putEnumerated(idLyr, idOrdn, idTrgt);
    desc18.putReference(idnull, ref10);
    var idT = charIDToTypeID("T   ");
    var desc19 = new ActionDescriptor();
    var idOpct = charIDToTypeID("Opct");
    var idPrc = charIDToTypeID("#Prc");
    desc19.putUnitDouble(idOpct, idPrc, foo66);
    var idLyr = charIDToTypeID("Lyr ");
    desc18.putObject(idT, idLyr, desc19);
    executeAction(idsetd, desc18, DialogModes.NO);
    app.refresh();
};
Generate1.onClick = function() {
    var idsetd = charIDToTypeID("setd");
    var desc7 = new ActionDescriptor();
    var idnull = charIDToTypeID("null");
    var ref4 = new ActionReference();
    var idLyr = charIDToTypeID("Lyr ");
    var idOrdn = charIDToTypeID("Ordn");
    var idTrgt = charIDToTypeID("Trgt");
    ref4.putEnumerated(idLyr, idOrdn, idTrgt);
    desc7.putReference(idnull, ref4);
    var idT = charIDToTypeID("T   ");
    var desc8 = new ActionDescriptor();
    var idMd = charIDToTypeID("Md  ");
    var idBlnM = charIDToTypeID("BlnM");
    var idNrml = charIDToTypeID("Nrml");
    desc8.putEnumerated(idMd, idBlnM, idNrml);
    var idLyr = charIDToTypeID("Lyr ");
    desc7.putObject(idT, idLyr, desc8);
    executeAction(idsetd, desc7, DialogModes.NO);
    app.refresh();
};
Generate2.onClick = function() {
    var idsetd = charIDToTypeID("setd");
    var desc18 = new ActionDescriptor();
    var idnull = charIDToTypeID("null");
    var ref13 = new ActionReference();
    var idLyr = charIDToTypeID("Lyr ");
    var idOrdn = charIDToTypeID("Ordn");
    var idTrgt = charIDToTypeID("Trgt");
    ref13.putEnumerated(idLyr, idOrdn, idTrgt);
    desc18.putReference(idnull, ref13);
    var idT = charIDToTypeID("T   ");
    var desc19 = new ActionDescriptor();
    var idMd = charIDToTypeID("Md  ");
    var idBlnM = charIDToTypeID("BlnM");
    var idClr = charIDToTypeID("Clr ");
    desc19.putEnumerated(idMd, idBlnM, idClr);
    var idLyr = charIDToTypeID("Lyr ");
    desc18.putObject(idT, idLyr, desc19);
    executeAction(idsetd, desc18, DialogModes.NO);
    app.refresh();
};
Generate3.onClick = function() {
    var idsetd = charIDToTypeID("setd");
    var desc1 = new ActionDescriptor();
    var idnull = charIDToTypeID("null");
    var ref1 = new ActionReference();
    var idLyr = charIDToTypeID("Lyr ");
    var idOrdn = charIDToTypeID("Ordn");
    var idTrgt = charIDToTypeID("Trgt");
    ref1.putEnumerated(idLyr, idOrdn, idTrgt);
    desc1.putReference(idnull, ref1);
    var idT = charIDToTypeID("T   ");
    var desc2 = new ActionDescriptor();
    var idMd = charIDToTypeID("Md  ");
    var idBlnM = charIDToTypeID("BlnM");
    var idLmns = charIDToTypeID("Lmns");
    desc2.putEnumerated(idMd, idBlnM, idLmns);
    var idLyr = charIDToTypeID("Lyr ");
    desc1.putObject(idT, idLyr, desc2);
    executeAction(idsetd, desc1, DialogModes.NO);
    app.refresh();
};
Generate4.onClick = function() {
    var idsetd = charIDToTypeID("setd");
    var desc5 = new ActionDescriptor();
    var idnull = charIDToTypeID("null");
    var ref3 = new ActionReference();
    var idLyr = charIDToTypeID("Lyr ");
    var idOrdn = charIDToTypeID("Ordn");
    var idTrgt = charIDToTypeID("Trgt");
    ref3.putEnumerated(idLyr, idOrdn, idTrgt);
    desc5.putReference(idnull, ref3);
    var idT = charIDToTypeID("T   ");
    var desc6 = new ActionDescriptor();
    var idMd = charIDToTypeID("Md  ");
    var idBlnM = charIDToTypeID("BlnM");
    var idSftL = charIDToTypeID("SftL");
    desc6.putEnumerated(idMd, idBlnM, idSftL);
    var idLyr = charIDToTypeID("Lyr ");
    desc5.putObject(idT, idLyr, desc6);
    executeAction(idsetd, desc5, DialogModes.NO);
    app.refresh();
};
Generate5.onClick = function() {
    var idsetd = charIDToTypeID("setd");
    var desc13 = new ActionDescriptor();
    var idnull = charIDToTypeID("null");
    var ref9 = new ActionReference();
    var idLyr = charIDToTypeID("Lyr ");
    var idOrdn = charIDToTypeID("Ordn");
    var idTrgt = charIDToTypeID("Trgt");
    ref9.putEnumerated(idLyr, idOrdn, idTrgt);
    desc13.putReference(idnull, ref9);
    var idT = charIDToTypeID("T   ");
    var desc14 = new ActionDescriptor();
    var idMd = charIDToTypeID("Md  ");
    var idBlnM = charIDToTypeID("BlnM");
    var idScrn = charIDToTypeID("Scrn");
    desc14.putEnumerated(idMd, idBlnM, idScrn);
    var idLyr = charIDToTypeID("Lyr ");
    desc13.putObject(idT, idLyr, desc14);
    executeAction(idsetd, desc13, DialogModes.NO);
    app.refresh();
};
Generate6.onClick = function() {
    var idDlt = charIDToTypeID("Dlt ");
    var desc9 = new ActionDescriptor();
    var idnull = charIDToTypeID("null");
    var ref5 = new ActionReference();
    var idLyr = charIDToTypeID("Lyr ");
    var idOrdn = charIDToTypeID("Ordn");
    var idTrgt = charIDToTypeID("Trgt");
    ref5.putEnumerated(idLyr, idOrdn, idTrgt);
    desc9.putReference(idnull, ref5);
    executeAction(idDlt, desc9, DialogModes.NO);
    app.refresh();
};
closeBtn = leftGr.add("button", undefined, "关闭");
closeBtn.preferredSize.width = 320;
close = false;
closeBtn.onClick = function() {
    close = true;
    win.close();
};
win.onClose = function() {
    close = true;
};
win.show();
while (close === false) {
    app.refresh();
}