historyState = "Ultimate Retouch - Digital Texture";
if (ScriptUI.environment.keyboardState.shiftKey) {
    var idMk = charIDToTypeID("Mk  ");
    var desc7 = new ActionDescriptor();
    var idnull = charIDToTypeID("null");
    var ref6 = new ActionReference();
    var idLyr = charIDToTypeID("Lyr ");
    ref6.putClass(idLyr);
    desc7.putReference(idnull, ref6);
    executeAction(idMk, desc7, DialogModes.NO);
    var idsetd = charIDToTypeID("setd");
    var desc8 = new ActionDescriptor();
    var idnull = charIDToTypeID("null");
    var ref7 = new ActionReference();
    var idLyr = charIDToTypeID("Lyr ");
    var idOrdn = charIDToTypeID("Ordn");
    var idTrgt = charIDToTypeID("Trgt");
    ref7.putEnumerated(idLyr, idOrdn, idTrgt);
    desc8.putReference(idnull, ref7);
    var idT = charIDToTypeID("T   ");
    var desc9 = new ActionDescriptor();
    var idMd = charIDToTypeID("Md  ");
    var idBlnM = charIDToTypeID("BlnM");
    var idClr = charIDToTypeID("Clr ");
    desc9.putEnumerated(idMd, idBlnM, idClr);
    var idLyr = charIDToTypeID("Lyr ");
    desc8.putObject(idT, idLyr, desc9);
    executeAction(idsetd, desc8, DialogModes.NO);
    var idsetd = charIDToTypeID("setd");
    var desc10 = new ActionDescriptor();
    var idnull = charIDToTypeID("null");
    var ref8 = new ActionReference();
    var idLyr = charIDToTypeID("Lyr ");
    var idOrdn = charIDToTypeID("Ordn");
    var idTrgt = charIDToTypeID("Trgt");
    ref8.putEnumerated(idLyr, idOrdn, idTrgt);
    desc10.putReference(idnull, ref8);
    var idT = charIDToTypeID("T   ");
    var desc11 = new ActionDescriptor();
    var idClr = charIDToTypeID("Clr ");
    var idClr = charIDToTypeID("Clr ");
    var idVlt = charIDToTypeID("Vlt ");
    desc11.putEnumerated(idClr, idClr, idVlt);
    var idLyr = charIDToTypeID("Lyr ");
    desc10.putObject(idT, idLyr, desc11);
    executeAction(idsetd, desc10, DialogModes.NO);
    var idsetd = charIDToTypeID("setd");
    var desc12 = 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);
    desc12.putReference(idnull, ref9);
    var idT = charIDToTypeID("T   ");
    var desc13 = new ActionDescriptor();
    var idNm = charIDToTypeID("Nm  ");
    desc13.putString(idNm, "Color Layer");
    var idLyr = charIDToTypeID("Lyr ");
    desc12.putObject(idT, idLyr, desc13);
    executeAction(idsetd, desc12, DialogModes.NO);
    var idslct = charIDToTypeID("slct");
    var desc14 = new ActionDescriptor();
    var idnull = charIDToTypeID("null");
    var ref10 = new ActionReference();
    var idPbTl = charIDToTypeID("PbTl");
    ref10.putClass(idPbTl);
    desc14.putReference(idnull, ref10);
    executeAction(idslct, desc14, DialogModes.NO);
} else {
    win = new Window("dialog", "其他");
    win.orientation = "column";
    b1L = 195;
    b2L = 83;
    s1L = 155;
    s2L = 115;
    s3L = 115;
    leftGr = win.add("group");
    leftGr.orientation = "column";
    bADB1 = leftGr.add("group");
    bADB1.alignment = "left";
    AUTODB1 = bADB1.add("button", undefined, "自动加深减淡 - 1");
    AUTODB1.preferredSize.width = b1L;
    AUTODB1.onClick = function() {
        close = true;
        win.close();
        win = new Window("dialog", "自动加深减淡 ");
        win.orientation = "column";
        b1L = 195;
        b2L = 83;
        s1L = 155;
        s2L = 115;
        s3L = 115;
        leftGr = win.add("group");
        leftGr.orientation = "column";
        historyState = "Ultimate Retouch - Auto DB";
        if (app) {
            ErrStrs = {};
            ErrStrs.USER_CANCELED = localize("$$$/ScriptingSupport/Errors/UserCancelled");
            var historyStateNow = -1;
            do {
                historyStateNow++
            } while (app.activeDocument.activeHistoryState != app.activeDocument.historyStates[historyStateNow])
            try {
                app.activeDocument.suspendHistory(historyState, "Frezze()");
            } catch (e) {
                if (e.number != 8007) {
                    alert(e + " : " + e.line);
                }
            }
        }

        function Frezze() {
            if (app) {
                try {
                    CheckDB();
                } catch (e) {

                }
            }

            function CheckDB() {
                var getName = app.activeDocument.activeLayer.name;
                var idslct = charIDToTypeID("slct");
                var desc410 = new ActionDescriptor();
                var idnull = charIDToTypeID("null");
                var ref300 = new ActionReference();
                var idLyr = charIDToTypeID("Lyr ");
                ref300.putName(idLyr, "Auto DB");
                desc410.putReference(idnull, ref300);
                var idMkVs = charIDToTypeID("MkVs");
                desc410.putBoolean(idMkVs, false);
                var idLyrI = charIDToTypeID("LyrI");
                var list239 = new ActionList();
                list239.putInteger(94);
                desc410.putList(idLyrI, list239);
                executeAction(idslct, desc410, DialogModes.NO);
                var idsetd = charIDToTypeID("setd");
                var desc422 = new ActionDescriptor();
                var idnull = charIDToTypeID("null");
                var ref309 = new ActionReference();
                var idLyr = charIDToTypeID("Lyr ");
                var idOrdn = charIDToTypeID("Ordn");
                var idTrgt = charIDToTypeID("Trgt");
                ref309.putEnumerated(idLyr, idOrdn, idTrgt);
                desc422.putReference(idnull, ref309);
                var idT = charIDToTypeID("T   ");
                var desc423 = new ActionDescriptor();
                var idNm = charIDToTypeID("Nm  ");
                desc423.putString(idNm, "Auto DB - old");
                var idLyr = charIDToTypeID("Lyr ");
                desc422.putObject(idT, idLyr, desc423);
                executeAction(idsetd, desc422, DialogModes.NO);
                var idsetd = charIDToTypeID("setd");
                var desc86 = new ActionDescriptor();
                var idnull = charIDToTypeID("null");
                var ref54 = new ActionReference();
                var idLyr = charIDToTypeID("Lyr ");
                var idOrdn = charIDToTypeID("Ordn");
                var idTrgt = charIDToTypeID("Trgt");
                ref54.putEnumerated(idLyr, idOrdn, idTrgt);
                desc86.putReference(idnull, ref54);
                var idT = charIDToTypeID("T   ");
                var desc87 = new ActionDescriptor();
                var idClr = charIDToTypeID("Clr ");
                var idClr = charIDToTypeID("Clr ");
                var idNone = charIDToTypeID("None");
                desc87.putEnumerated(idClr, idClr, idNone);
                var idLyr = charIDToTypeID("Lyr ");
                desc86.putObject(idT, idLyr, desc87);
                executeAction(idsetd, desc86, DialogModes.NO);
                var idslct = charIDToTypeID("slct");
                var desc410 = new ActionDescriptor();
                var idnull = charIDToTypeID("null");
                var ref300 = new ActionReference();
                var idLyr = charIDToTypeID("Lyr ");
                ref300.putName(idLyr, getName);
                desc410.putReference(idnull, ref300);
                var idMkVs = charIDToTypeID("MkVs");
                desc410.putBoolean(idMkVs, false);
                var idLyrI = charIDToTypeID("LyrI");
                var list239 = new ActionList();
                list239.putInteger(94);
                desc410.putList(idLyrI, list239);
                executeAction(idslct, desc410, DialogModes.NO);
                app.refresh();
            }
            if (app) {
                try {
                    MainCatch3();
                } catch (e) {

                }
            }

            function MainCatch3() {
                function GausFast2copy2() {
                    function step1(enabled, withDialog) {
                        if (enabled != undefined && !enabled) {
                            return;
                        }
                        var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                        var desc1 = new ActionDescriptor();
                        var ref1 = new ActionReference();
                        ref1.putClass(PSClass.Layer);
                        desc1.putReference(PSString.Null, ref1);
                        desc1.putInteger(PSKey.LayerID, 122);
                        executeAction(PSEvent.Make, desc1, dialogMode);
                    }

                    function step2(enabled, withDialog) {
                        if (enabled != undefined && !enabled) {
                            return;
                        }
                        var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                        var desc1 = new ActionDescriptor();
                        desc1.putBoolean(PSKey.Duplicate, true);
                        executeAction(sTID("mergeVisible"), desc1, dialogMode);
                    }

                    function step3(enabled, withDialog) {
                        if (enabled != undefined && !enabled) {
                            return;
                        }
                        var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                        var desc1 = new ActionDescriptor();
                        var ref1 = new ActionReference();
                        ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                        desc1.putReference(PSString.Null, ref1);
                        var desc2 = new ActionDescriptor();
                        desc2.putString(PSKey.Name, "TEMP DB");
                        desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                        executeAction(PSEvent.Set, desc1, dialogMode);
                    }

                    function step4(enabled, withDialog) {
                        if (enabled != undefined && !enabled) {
                            return;
                        }
                        var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                        executeAction(PSEvent.Desaturate, undefined, dialogMode);
                    }

                    function step5(enabled, withDialog) {
                        if (enabled != undefined && !enabled) {
                            return;
                        }
                        var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                        var desc1 = new ActionDescriptor();
                        var desc2 = new ActionDescriptor();
                        var ref1 = new ActionReference();
                        ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
                        ref1.putName(PSClass.Layer, "TEMP DB");
                        desc2.putReference(PSKey.To, ref1);
                        desc1.putObject(PSKey.With, PSClass.Calculation, desc2);
                        executeAction(sTID("applyImageEvent"), desc1, dialogMode);
                    }

                    function step6(enabled, withDialog) {
                        if (enabled != undefined && !enabled) {
                            return;
                        }
                        var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                        var desc1 = new ActionDescriptor();
                        var ref1 = new ActionReference();
                        ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                        desc1.putReference(PSString.Null, ref1);
                        var desc2 = new ActionDescriptor();
                        desc2.putString(PSKey.Name, "Auto DB");
                        desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                        executeAction(PSEvent.Set, desc1, dialogMode);
                    }

                    function step7(enabled, withDialog) {
                        if (enabled != undefined && !enabled) {
                            return;
                        }
                        var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                        executeAction(sTID("newPlacedLayer"), undefined, dialogMode);
                    }

                    function step8(enabled, withDialog) {
                        if (enabled != undefined && !enabled) {
                            return;
                        }
                        var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                        var desc1 = new ActionDescriptor();
                        desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 100);
                        executeAction(sTID("highPass"), desc1, dialogMode);
                    }

                    function step9(enabled, withDialog) {
                        if (enabled != undefined && !enabled) {
                            return;
                        }
                        var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                        var desc1 = new ActionDescriptor();
                        var ref1 = new ActionReference();
                        ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                        desc1.putReference(PSString.Null, ref1);
                        var desc2 = new ActionDescriptor();
                        desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Overlay);
                        desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                        executeAction(PSEvent.Set, desc1, dialogMode);
                    }

                    function step10(enabled, withDialog) {
                        if (enabled != undefined && !enabled) {
                            return;
                        }
                        var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                        var desc1 = new ActionDescriptor();
                        var ref1 = new ActionReference();
                        ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSString.filterMask);
                        desc1.putReference(PSString.Null, ref1);
                        desc1.putBoolean(PSKey.MakeVisible, false);
                        executeAction(PSEvent.Select, desc1, dialogMode);
                    }

                    function step11(enabled, withDialog) {
                        if (enabled != undefined && !enabled) {
                            return;
                        }
                        var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                        var desc1 = new ActionDescriptor();
                        var ref1 = new ActionReference();
                        ref1.putEnumerated(PSClass.Channel, PSType.Ordinal, PSEnum.Target);
                        desc1.putReference(PSString.Null, ref1);
                        executeAction(PSEvent.Delete, desc1, dialogMode);
                    }

                    function step12(enabled, withDialog) {
                        if (enabled != undefined && !enabled) {
                            return;
                        }
                        var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                        var desc1 = new ActionDescriptor();
                        desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 25);
                        executeAction(sTID("gaussianBlur"), desc1, dialogMode);
                        var idsetd = charIDToTypeID("setd");
                        var desc6629 = new ActionDescriptor();
                        var idnull = charIDToTypeID("null");
                        var ref2427 = new ActionReference();
                        var idLyr = charIDToTypeID("Lyr ");
                        var idOrdn = charIDToTypeID("Ordn");
                        var idTrgt = charIDToTypeID("Trgt");
                        ref2427.putEnumerated(idLyr, idOrdn, idTrgt);
                        desc6629.putReference(idnull, ref2427);
                        var idT = charIDToTypeID("T   ");
                        var desc6630 = new ActionDescriptor();
                        var idOpct = charIDToTypeID("Opct");
                        var idPrc = charIDToTypeID("#Prc");
                        desc6630.putUnitDouble(idOpct, idPrc, 30);
                        var idLyr = charIDToTypeID("Lyr ");
                        desc6629.putObject(idT, idLyr, desc6630);
                        executeAction(idsetd, desc6629, DialogModes.NO);
                    }
                    step1();
                    step2();
                    step3();
                    step4();
                    step5();
                    step6();
                    step7();
                    step8();
                    step9();
                    step10();
                    step11();
                    step12();
                    step13();
                    step14();
                    step15();
                    step16();
                    step17();
                    step18();
                    step19();
                    step20();
                    step21();
                    step22();
                    step23();
                    step24();
                    step25();
                    step26();
                    step27();
                    step28();
                    step29();
                    step30();
                    step31();
                    step32();
                    step33();
                    step34();
                    step35();
                    step36();
                    step37();
                    step38();
                    step39();
                    step40();
                    step41();
                    step42();
                    step43();
                    step44();
                    step45();
                    step46();
                    step47();
                    step48();
                    step49();
                    step50();
                    step51();
                }
                cTID = function(s) {
                    return app.charIDToTypeID(s);
                };
                sTID = function(s) {
                    return app.stringIDToTypeID(s);
                };
                GausFast2copy2.loadSymbols = function() {
                    var dbgLevel = $.level;
                    $.level = 0;
                    try {
                        PSConstants;
                        return;
                    } catch (e) {

                    } finally {
                        $.level = dbgLevel;
                    }
                    var needDefs = true;
                    $.level = 0;
                    try {
                        PSClass;
                        needDefs = false;
                    } catch (e) {

                    } finally {
                        $.level = dbgLevel;
                    }
                    if (needDefs) {
                        PSClass = function() {

                        };
                        PSEnum = function() {

                        };
                        PSEvent = function() {

                        };
                        PSForm = function() {

                        };
                        PSKey = function() {

                        };
                        PSType = function() {

                        };
                        PSUnit = function() {

                        };
                        PSString = function() {

                        };
                    }
                    PSClass.Calculation = cTID("Clcl");
                    PSClass.Channel = cTID("Chnl");
                    PSClass.Layer = cTID("Lyr ");
                    PSClass.Mask = cTID("Msk ");
                    PSEnum.Overlay = cTID("Ovrl");
                    PSEnum.RGB = cTID("RGB ");
                    PSEnum.RevealSelection = cTID("RvlS");
                    PSEnum.Target = cTID("Trgt");
                    PSEvent.Delete = cTID("Dlt ");
                    PSEvent.Desaturate = cTID("Dstt");
                    PSEvent.Hide = cTID("Hd  ");
                    PSEvent.Make = cTID("Mk  ");
                    PSEvent.Select = cTID("slct");
                    PSEvent.Set = cTID("setd");
                    PSEvent.Show = cTID("Shw ");
                    PSKey.At = cTID("At  ");
                    PSKey.Brightness = cTID("Brgh");
                    PSKey.Colors = cTID("Clrs");
                    PSKey.Contrast = cTID("Cntr");
                    PSKey.Duplicate = cTID("Dplc");
                    PSKey.From = cTID("From");
                    PSKey.Fuzziness = cTID("Fzns");
                    PSKey.LayerID = cTID("LyrI");
                    PSKey.MakeVisible = cTID("MkVs");
                    PSKey.Mode = cTID("Md  ");
                    PSKey.Name = cTID("Nm  ");
                    PSKey.New = cTID("Nw  ");
                    PSKey.Radius = cTID("Rds ");
                    PSKey.Threshold = cTID("Thsh");
                    PSKey.To = cTID("T   ");
                    PSKey.Using = cTID("Usng");
                    PSKey.With = cTID("With");
                    PSString.Null = sTID("null");
                    PSString.addToSelectionContinuous = sTID("addToSelectionContinuous");
                    PSString.filterMask = sTID("filterMask");
                    PSString.layerGroup = sTID("layerSection");
                    PSString.layerGroupEnd = sTID("layerSectionEnd");
                    PSString.layerGroupStart = sTID("layerSectionStart");
                    PSString.linearLight = sTID("linearLight");
                    PSString.selectionModifier = sTID("selectionModifier");
                    PSString.selectionModifierType = sTID("selectionModifierType");
                    PSType.BlendMode = cTID("BlnM");
                    PSType.Ordinal = cTID("Ordn");
                    PSType.UserMaskOptions = cTID("UsrM");
                    PSUnit.Pixels = cTID("#Pxl");
                };
                GausFast2copy2.loadSymbols();
                GausFast2copy2.main = function() {
                    GausFast2copy2();
                };
                GausFast2copy2.main();
            }
            app.refresh();
        }
        sliderGroup44 = leftGr.add("group");
        sliderGroup44.alignment = "left";
        slTxt2 = sliderGroup44.add("staticText", undefined, "开 | 关：");
        check00 = sliderGroup44.add("checkbox", undefined);
        check00.value = true;
        check00.onClick = function() {
            if (check00.value === true) {
                var idslct = charIDToTypeID("slct");
                var desc2240 = new ActionDescriptor();
                var idnull = charIDToTypeID("null");
                var ref1147 = new ActionReference();
                var idLyr = charIDToTypeID("Lyr ");
                ref1147.putName(idLyr, "Auto DB");
                desc2240.putReference(idnull, ref1147);
                var idMkVs = charIDToTypeID("MkVs");
                desc2240.putBoolean(idMkVs, false);
                var idLyrI = charIDToTypeID("LyrI");
                var list677 = new ActionList();
                list677.putInteger(76);
                desc2240.putList(idLyrI, list677);
                executeAction(idslct, desc2240, DialogModes.NO);
                var idShw = charIDToTypeID("Shw ");
                var desc2242 = new ActionDescriptor();
                var idnull = charIDToTypeID("null");
                var list679 = new ActionList();
                var ref1149 = new ActionReference();
                var idLyr = charIDToTypeID("Lyr ");
                var idOrdn = charIDToTypeID("Ordn");
                var idTrgt = charIDToTypeID("Trgt");
                ref1149.putEnumerated(idLyr, idOrdn, idTrgt);
                list679.putReference(ref1149);
                desc2242.putList(idnull, list679);
                executeAction(idShw, desc2242, DialogModes.NO);
                app.refresh();
            } else {
                var idslct = charIDToTypeID("slct");
                var desc2240 = new ActionDescriptor();
                var idnull = charIDToTypeID("null");
                var ref1147 = new ActionReference();
                var idLyr = charIDToTypeID("Lyr ");
                ref1147.putName(idLyr, "Auto DB");
                desc2240.putReference(idnull, ref1147);
                var idMkVs = charIDToTypeID("MkVs");
                desc2240.putBoolean(idMkVs, false);
                var idLyrI = charIDToTypeID("LyrI");
                var list677 = new ActionList();
                list677.putInteger(76);
                desc2240.putList(idLyrI, list677);
                executeAction(idslct, desc2240, DialogModes.NO);
                var idHd = charIDToTypeID("Hd  ");
                var desc2241 = new ActionDescriptor();
                var idnull = charIDToTypeID("null");
                var list678 = new ActionList();
                var ref1148 = new ActionReference();
                var idLyr = charIDToTypeID("Lyr ");
                var idOrdn = charIDToTypeID("Ordn");
                var idTrgt = charIDToTypeID("Trgt");
                ref1148.putEnumerated(idLyr, idOrdn, idTrgt);
                list678.putReference(ref1148);
                desc2241.putList(idnull, list678);
                executeAction(idHd, desc2241, DialogModes.NO);
                app.refresh();
            }
        };
        sliderGroup = leftGr.add("group");
        sliderGroup.orientation = "row";
        sliderGroup.alignChildren = ["fill", "fill"];
        sliderGroup.alignment = "left";
        slTxt3334 = sliderGroup.add("staticText", undefined, "不透明度：");
        sliderDC = sliderGroup.add("slider", undefined, 30, 0, 100);
        sliderDC.preferredSize.width = s2L;
        sliderValueDC = sliderGroup.add("statictext", undefined, " 30 ");
        sliderGroup = leftGr.add("group");
        sliderGroup.orientation = "row";
        sliderGroup.alignChildren = ["fill", "fill"];
        sliderGroup.alignment = "left";
        slTxt335 = sliderGroup.add("staticText", undefined, "模糊： ");
        sliderCC = sliderGroup.add("slider", undefined, 50, 0, 100);
        sliderCC.preferredSize.width = s3L;
        sliderValueCC = sliderGroup.add("statictext", undefined, " 50 ");
        sliderCC.onChanging = function() {
            sliderValueCC.text = Math.round(this.value);
        };
        sliderCC.onChange = function() {
            foo = Math.round(this.value);
            foo2 = foo / 2;
            var idslct = charIDToTypeID("slct");
            var desc197 = new ActionDescriptor();
            var idnull = charIDToTypeID("null");
            var ref128 = new ActionReference();
            var idLyr = charIDToTypeID("Lyr ");
            ref128.putName(idLyr, "Auto DB");
            desc197.putReference(idnull, ref128);
            var idMkVs = charIDToTypeID("MkVs");
            desc197.putBoolean(idMkVs, false);
            var idLyrI = charIDToTypeID("LyrI");
            var list11 = new ActionList();
            list11.putInteger(34);
            desc197.putList(idLyrI, list11);
            executeAction(idslct, desc197, DialogModes.NO);
            var idsetd = charIDToTypeID("setd");
            var desc198 = new ActionDescriptor();
            var idnull = charIDToTypeID("null");
            var ref129 = new ActionReference();
            var idfilterFX = stringIDToTypeID("filterFX");
            ref129.putIndex(idfilterFX, 2);
            var idLyr = charIDToTypeID("Lyr ");
            var idOrdn = charIDToTypeID("Ordn");
            var idTrgt = charIDToTypeID("Trgt");
            ref129.putEnumerated(idLyr, idOrdn, idTrgt);
            desc198.putReference(idnull, ref129);
            var idfilterFX = stringIDToTypeID("filterFX");
            var desc199 = new ActionDescriptor();
            var idFltr = charIDToTypeID("Fltr");
            var desc200 = new ActionDescriptor();
            var idRds = charIDToTypeID("Rds ");
            var idPxl = charIDToTypeID("#Pxl");
            desc200.putUnitDouble(idRds, idPxl, foo2);
            var idGsnB = charIDToTypeID("GsnB");
            desc199.putObject(idFltr, idGsnB, desc200);
            var idfilterFX = stringIDToTypeID("filterFX");
            desc198.putObject(idfilterFX, idfilterFX, desc199);
            executeAction(idsetd, desc198, DialogModes.NO);
            app.refresh();
        };
        sliderGroup = leftGr.add("group");
        sliderGroup.orientation = "row";
        sliderGroup.alignChildren = ["fill", "fill"];
        sliderGroup.alignment = "left";
        slTxt334 = sliderGroup.add("staticText", undefined, "对比度： ");
        sliderD = sliderGroup.add("slider", undefined, 50, 0, 100);
        sliderD.preferredSize.width = s2L;
        sliderValueD = sliderGroup.add("statictext", undefined, " 50  ");
        sliderD.onChanging = function() {
            sliderValueD.text = Math.round(this.value);
        };
        sliderD.onChange = function() {
            foo = Math.round(this.value);
            foo2 = foo * 2;
            var idslct = charIDToTypeID("slct");
            var desc197 = new ActionDescriptor();
            var idnull = charIDToTypeID("null");
            var ref128 = new ActionReference();
            var idLyr = charIDToTypeID("Lyr ");
            ref128.putName(idLyr, "Auto DB");
            desc197.putReference(idnull, ref128);
            var idMkVs = charIDToTypeID("MkVs");
            desc197.putBoolean(idMkVs, false);
            var idLyrI = charIDToTypeID("LyrI");
            var list11 = new ActionList();
            list11.putInteger(34);
            desc197.putList(idLyrI, list11);
            executeAction(idslct, desc197, DialogModes.NO);
            var idsetd = charIDToTypeID("setd");
            var desc4 = new ActionDescriptor();
            var idnull = charIDToTypeID("null");
            var ref1 = new ActionReference();
            var idfilterFX = stringIDToTypeID("filterFX");
            ref1.putIndex(idfilterFX, 1);
            var idLyr = charIDToTypeID("Lyr ");
            var idOrdn = charIDToTypeID("Ordn");
            var idTrgt = charIDToTypeID("Trgt");
            ref1.putEnumerated(idLyr, idOrdn, idTrgt);
            desc4.putReference(idnull, ref1);
            var idfilterFX = stringIDToTypeID("filterFX");
            var desc5 = new ActionDescriptor();
            var idFltr = charIDToTypeID("Fltr");
            var desc6 = new ActionDescriptor();
            var idRds = charIDToTypeID("Rds ");
            var idPxl = charIDToTypeID("#Pxl");
            desc6.putUnitDouble(idRds, idPxl, foo2);
            var idHghP = charIDToTypeID("HghP");
            desc5.putObject(idFltr, idHghP, desc6);
            var idfilterFX = stringIDToTypeID("filterFX");
            desc4.putObject(idfilterFX, idfilterFX, desc5);
            executeAction(idsetd, desc4, DialogModes.NO);
            app.refresh();
        };
        sliderDC.onChanging = function() {
            sliderValueDC.text = Math.round(this.value);
        };
        sliderDC.onChange = function() {
            foo = Math.round(this.value);
            foo = Math.round(this.value);
            var idslct = charIDToTypeID("slct");
            var desc25 = new ActionDescriptor();
            var idnull = charIDToTypeID("null");
            var ref18 = new ActionReference();
            var idLyr = charIDToTypeID("Lyr ");
            ref18.putName(idLyr, "Auto DB");
            desc25.putReference(idnull, ref18);
            var idMkVs = charIDToTypeID("MkVs");
            desc25.putBoolean(idMkVs, false);
            executeAction(idslct, desc25, DialogModes.NO);
            var idsetd = charIDToTypeID("setd");
            var desc6629 = new ActionDescriptor();
            var idnull = charIDToTypeID("null");
            var ref2427 = new ActionReference();
            var idLyr = charIDToTypeID("Lyr ");
            var idOrdn = charIDToTypeID("Ordn");
            var idTrgt = charIDToTypeID("Trgt");
            ref2427.putEnumerated(idLyr, idOrdn, idTrgt);
            desc6629.putReference(idnull, ref2427);
            var idT = charIDToTypeID("T   ");
            var desc6630 = new ActionDescriptor();
            var idOpct = charIDToTypeID("Opct");
            var idPrc = charIDToTypeID("#Prc");
            desc6630.putUnitDouble(idOpct, idPrc, foo);
            var idLyr = charIDToTypeID("Lyr ");
            desc6629.putObject(idT, idLyr, desc6630);
            executeAction(idsetd, desc6629, DialogModes.NO);
            app.refresh();
        };
        closeBtn = leftGr.add("button", undefined, "关闭");
        closeBtn.alignment = "left";
        closeBtn.preferredSize.width = b1L;
        close = false;
        closeBtn.onClick = function() {
            close = true;
            win.close();
        };
        win.onClose = function() {
            close = true;
        };
        win.show();
        while (close === false) {
            app.refresh();
        }
    };
    bADB2 = leftGr.add("group");
    bADB2.alignment = "left";
    AUTODB2 = bADB2.add("button", undefined, "自动加深减淡 - 2");
    AUTODB2.preferredSize.width = b1L;
    AUTODB2.onClick = function() {
        close = true;
        win.close();

        function AUTODB() {
            function step1(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putClass(PSClass.AdjustmentLayer);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                var desc3 = new ActionDescriptor();
                desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
                desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
                desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
                executeAction(PSEvent.Make, desc1, dialogMode);
            }

            function step2(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Channel, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSString.Null, ref1);
                executeAction(PSEvent.Delete, desc1, dialogMode);
            }

            function step3(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                desc2.putString(PSKey.Name, "Dodge Control");
                desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                executeAction(PSEvent.Set, desc1, dialogMode);
            }

            function step4(enabled, withDialog) {

            }

            function step5(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Screen);
                desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                executeAction(PSEvent.Set, desc1, dialogMode);
            }

            function step6(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                var list1 = new ActionList();
                var desc3 = new ActionDescriptor();
                var ref2 = new ActionReference();
                ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Gray);
                desc3.putReference(PSClass.Channel, ref2);
                desc3.putInteger(PSKey.SrcBlackMin, 0);
                desc3.putInteger(PSKey.SrcBlackMax, 0);
                desc3.putInteger(PSKey.SrcWhiteMin, 255);
                desc3.putInteger(PSKey.SrcWhiteMax, 255);
                desc3.putInteger(PSKey.DestBlackMin, 130);
                desc3.putInteger(PSKey.DestBlackMax, 255);
                desc3.putInteger(PSKey.DestWhiteMin, 255);
                desc3.putInteger(PSKey.DestWhiteMax, 255);
                list1.putObject(PSClass.BlendRange, desc3);
                desc2.putList(PSClass.BlendRange, list1);
                var desc4 = new ActionDescriptor();
                desc4.putUnitDouble(PSKey.Scale, PSUnit.Percent, 100);
                desc2.putObject(PSKey.LayerEffects, PSKey.LayerEffects, desc4);
                desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                executeAction(PSEvent.Set, desc1, dialogMode);
            }

            function step7(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                executeAction(sTID("copyToLayer"), undefined, dialogMode);
            }

            function step8(enabled, withDialog) {

            }

            function step9(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Multiply);
                desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                executeAction(PSEvent.Set, desc1, dialogMode);
            }

            function step10(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                desc2.putString(PSKey.Name, "Burn Control");
                desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                executeAction(PSEvent.Set, desc1, dialogMode);
            }

            function step11(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                var list1 = new ActionList();
                var desc3 = new ActionDescriptor();
                var ref2 = new ActionReference();
                ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Gray);
                desc3.putReference(PSClass.Channel, ref2);
                desc3.putInteger(PSKey.SrcBlackMin, 0);
                desc3.putInteger(PSKey.SrcBlackMax, 0);
                desc3.putInteger(PSKey.SrcWhiteMin, 255);
                desc3.putInteger(PSKey.SrcWhiteMax, 255);
                desc3.putInteger(PSKey.DestBlackMin, 0);
                desc3.putInteger(PSKey.DestBlackMax, 0);
                desc3.putInteger(PSKey.DestWhiteMin, 128);
                desc3.putInteger(PSKey.DestWhiteMax, 255);
                list1.putObject(PSClass.BlendRange, desc3);
                desc2.putList(PSClass.BlendRange, list1);
                desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                executeAction(PSEvent.Set, desc1, dialogMode);
            }

            function step12(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putName(PSClass.Layer, "Dodge Control");
                desc1.putReference(PSString.Null, ref1);
                desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
                desc1.putBoolean(PSKey.MakeVisible, false);
                var list1 = new ActionList();
                list1.putInteger(26);
                list1.putInteger(sTID("skinTone"), 27);
                desc1.putList(PSKey.LayerID, list1);
                executeAction(PSEvent.Select, desc1, dialogMode);
            }

            function step13(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putClass(PSString.layerGroup);
                desc1.putReference(PSString.Null, ref1);
                var ref2 = new ActionReference();
                ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSKey.From, ref2);
                desc1.putInteger(PSString.layerGroupStart, 22);
                desc1.putInteger(PSString.layerGroupEnd, 23);
                desc1.putString(PSKey.Name, "Group 1");
                executeAction(PSEvent.Make, desc1, dialogMode);
            }

            function step14(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                desc2.putString(PSKey.Name, "CHANGE OPACITY");
                desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                executeAction(PSEvent.Set, desc1, dialogMode);
            }

            function step15(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                desc1.putClass(PSKey.New, PSClass.Channel);
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSClass.Mask);
                desc1.putReference(PSKey.At, ref1);
                desc1.putEnumerated(PSKey.Using, PSType.UserMaskOptions, PSEnum.RevealAll);
                executeAction(PSEvent.Make, desc1, dialogMode);
            }

            function step16(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var desc2 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
                ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
                desc2.putReference(PSKey.To, ref1);
                desc2.putEnumerated(PSKey.Calculation, PSType.Calculation, PSEnum.Multiply);
                desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
                desc2.putBoolean(PSKey.PreserveTransparency, true);
                desc1.putObject(PSKey.With, PSKey.Calculation, desc2);
                executeAction(sTID("applyImageEvent"), desc1, dialogMode);
            }

            function step17(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
                desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                executeAction(PSEvent.Set, desc1, dialogMode);
            }

            function step18(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                desc2.putEnumerated(PSKey.Color, PSKey.Color, PSEnum.Gray);
                desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                executeAction(PSEvent.Set, desc1, dialogMode);
            }

            function step19(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putClass(PSString.layerGroup);
                desc1.putReference(PSString.Null, ref1);
                var ref2 = new ActionReference();
                ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSKey.From, ref2);
                desc1.putInteger(PSString.layerGroupStart, 7);
                desc1.putInteger(PSString.layerGroupEnd, 8);
                desc1.putString(PSKey.Name, "Group 1");
                executeAction(PSEvent.Make, desc1, dialogMode);
            }

            function step20(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                desc2.putString(PSKey.Name, "AUTO DB - 2");
                desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                executeAction(PSEvent.Set, desc1, dialogMode);
            }

            function step21(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                desc1.putClass(PSKey.New, PSClass.Channel);
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSClass.Mask);
                desc1.putReference(PSKey.At, ref1);
                desc1.putEnumerated(PSKey.Using, PSType.UserMaskOptions, PSEnum.RevealAll);
                executeAction(PSEvent.Make, desc1, dialogMode);
            }

            function step22(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                executeAction(PSEvent.Invert, undefined, dialogMode);
            }

            function step23(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putClass(PSClass.PaintbrushTool);
                desc1.putReference(PSString.Null, ref1);
                executeAction(PSEvent.Select, desc1, dialogMode);
            }

            function step24(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                desc2.putEnumerated(PSKey.Color, PSKey.Color, PSEnum.Gray);
                desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                executeAction(PSEvent.Set, desc1, dialogMode);
            }
            step1();
            step2();
            step3();
            step4();
            step5();
            step6();
            step7();
            step8();
            step9();
            step10();
            step11();
            step12();
            step13();
            step14();
            step15();
            step16();
            step17();
            step18();
            step19();
            step20();
            step21();
            step22();
            step23();
            step24();
        }
        cTID = function(s) {
            return app.charIDToTypeID(s);
        };
        sTID = function(s) {
            return app.stringIDToTypeID(s);
        };
        AUTODB.loadSymbols = function() {
            var dbgLevel = $.level;
            $.level = 0;
            try {
                PSConstants;
                return;
            } catch (e) {

            } finally {
                $.level = dbgLevel;
            }
            var needDefs = true;
            $.level = 0;
            try {
                PSClass;
                needDefs = false;
            } catch (e) {

            } finally {
                $.level = dbgLevel;
            }
            if (needDefs) {
                PSClass = function() {

                };
                PSEnum = function() {

                };
                PSEvent = function() {

                };
                PSForm = function() {

                };
                PSKey = function() {

                };
                PSType = function() {

                };
                PSUnit = function() {

                };
                PSString = function() {

                };
            }
            PSClass.AdjustmentLayer = cTID("AdjL");
            PSClass.BlendRange = cTID("Blnd");
            PSClass.Channel = cTID("Chnl");
            PSClass.Curves = cTID("Crvs");
            PSClass.Layer = cTID("Lyr ");
            PSClass.Mask = cTID("Msk ");
            PSClass.PaintbrushTool = cTID("PbTl");
            PSEnum.Gray = cTID("Gry ");
            PSEnum.Merged = cTID("Mrgd");
            PSEnum.Multiply = cTID("Mltp");
            PSEnum.RGB = cTID("RGB ");
            PSEnum.RevealAll = cTID("RvlA");
            PSEnum.Screen = cTID("Scrn");
            PSEnum.Target = cTID("Trgt");
            PSEnum.Violet = cTID("Vlt ");
            PSEvent.Delete = cTID("Dlt ");
            PSEvent.Invert = cTID("Invr");
            PSEvent.Make = cTID("Mk  ");
            PSEvent.Select = cTID("slct");
            PSEvent.Set = cTID("setd");
            PSKey.At = cTID("At  ");
            PSKey.Calculation = cTID("Clcl");
            PSKey.Color = cTID("Clr ");
            PSKey.DestBlackMax = cTID("Dstl");
            PSKey.DestBlackMin = cTID("DstB");
            PSKey.DestWhiteMax = cTID("Dstt");
            PSKey.DestWhiteMin = cTID("DstW");
            PSKey.From = cTID("From");
            PSKey.LayerEffects = cTID("Lefx");
            PSKey.LayerID = cTID("LyrI");
            PSKey.MakeVisible = cTID("MkVs");
            PSKey.Mode = cTID("Md  ");
            PSKey.Name = cTID("Nm  ");
            PSKey.New = cTID("Nw  ");
            PSKey.Opacity = cTID("Opct");
            PSKey.PreserveTransparency = cTID("PrsT");
            PSKey.Scale = cTID("Scl ");
            PSKey.SrcBlackMax = cTID("Srcl");
            PSKey.SrcBlackMin = cTID("SrcB");
            PSKey.SrcWhiteMax = cTID("Srcm");
            PSKey.SrcWhiteMin = cTID("SrcW");
            PSKey.To = cTID("T   ");
            PSKey.Type = cTID("Type");
            PSKey.Using = cTID("Usng");
            PSKey.With = cTID("With");
            PSString.Null = sTID("null");
            PSString.addToSelectionContinuous = sTID("addToSelectionContinuous");
            PSString.layerGroup = sTID("layerSection");
            PSString.layerGroupEnd = sTID("layerSectionEnd");
            PSString.layerGroupStart = sTID("layerSectionStart");
            PSString.presetKind = sTID("presetKind");
            PSString.presetKindDefault = sTID("presetKindDefault");
            PSString.presetKindType = sTID("presetKindType");
            PSString.selectionModifier = sTID("selectionModifier");
            PSString.selectionModifierType = sTID("selectionModifierType");
            PSType.BlendMode = cTID("BlnM");
            PSType.Calculation = cTID("Clcn");
            PSType.Ordinal = cTID("Ordn");
            PSType.UserMaskOptions = cTID("UsrM");
            PSUnit.Percent = cTID("#Prc");
        };
        AUTODB.loadSymbols();
        AUTODB.main = function() {
            AUTODB();
        };
        AUTODB.main();
    };
    bAD = leftGr.add("group");
    bAD.alignment = "left";
    AUTODODGE = bAD.add("button", undefined, "自动加深");
    AUTODODGE.preferredSize.width = b1L;
    AUTODODGE.onClick = function() {
        close = true;
        win.close();

        function OnlyDodge() {
            function step1(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putClass(PSClass.AdjustmentLayer);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                var desc3 = new ActionDescriptor();
                desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
                desc2.putObject(PSKey.Type, PSClass.Curves, desc3);
                desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
                executeAction(PSEvent.Make, desc1, dialogMode);
            }

            function step2(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var desc2 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
                ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Merged);
                desc2.putReference(PSKey.To, ref1);
                desc2.putEnumerated(PSKey.Calculation, PSType.Calculation, PSEnum.Multiply);
                desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
                desc2.putBoolean(PSKey.PreserveTransparency, true);
                desc1.putObject(PSKey.With, PSKey.Calculation, desc2);
                executeAction(sTID("applyImageEvent"), desc1, dialogMode);
            }

            function step3(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Screen);
                desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                executeAction(PSEvent.Set, desc1, dialogMode);
            }

            function step4(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
                desc1.putReference(PSString.Null, ref1);
                desc1.putBoolean(PSKey.MakeVisible, false);
                executeAction(PSEvent.Select, desc1, dialogMode);
            }

            function step5(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                desc2.putString(PSKey.Name, "Dodge");
                desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                executeAction(PSEvent.Set, desc1, dialogMode);
            }

            function step6(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                var list1 = new ActionList();
                var desc3 = new ActionDescriptor();
                var ref2 = new ActionReference();
                ref2.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Gray);
                desc3.putReference(PSClass.Channel, ref2);
                desc3.putInteger(PSKey.SrcBlackMin, 0);
                desc3.putInteger(PSKey.SrcBlackMax, 0);
                desc3.putInteger(PSKey.SrcWhiteMin, 255);
                desc3.putInteger(PSKey.SrcWhiteMax, 255);
                desc3.putInteger(PSKey.DestBlackMin, 130);
                desc3.putInteger(PSKey.DestBlackMax, 255);
                desc3.putInteger(PSKey.DestWhiteMin, 255);
                desc3.putInteger(PSKey.DestWhiteMax, 255);
                list1.putObject(PSClass.BlendRange, desc3);
                desc2.putList(PSClass.BlendRange, list1);
                var desc4 = new ActionDescriptor();
                desc4.putUnitDouble(PSKey.Scale, PSUnit.Percent, 100);
                desc2.putObject(PSKey.LayerEffects, PSKey.LayerEffects, desc4);
                desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                executeAction(PSEvent.Set, desc1, dialogMode);
            }

            function step7(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putClass(PSClass.Layer);
                desc1.putReference(PSString.Null, ref1);
                desc1.putInteger(PSKey.LayerID, 25);
                executeAction(PSEvent.Make, desc1, dialogMode);
            }

            function step8(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                desc2.putString(PSKey.Name, "blank layer");
                desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                executeAction(PSEvent.Set, desc1, dialogMode);
            }

            function step9(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putName(PSClass.Layer, "Dodge");
                desc1.putReference(PSString.Null, ref1);
                desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
                desc1.putBoolean(PSKey.MakeVisible, false);
                var list1 = new ActionList();
                list1.putInteger(14);
                list1.putInteger(sTID("skinTone"), 24);
                list1.putInteger(sTID("contentAware"), 25);
                desc1.putList(PSKey.LayerID, list1);
                executeAction(PSEvent.Select, desc1, dialogMode);
            }

            function step10(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putClass(PSString.layerGroup);
                desc1.putReference(PSString.Null, ref1);
                var ref2 = new ActionReference();
                ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSKey.From, ref2);
                desc1.putInteger(PSString.layerGroupStart, 22);
                desc1.putInteger(PSString.layerGroupEnd, 23);
                desc1.putString(PSKey.Name, "Group 1");
                executeAction(PSEvent.Make, desc1, dialogMode);
            }

            function step11(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                desc2.putString(PSKey.Name, "CHANGE OPACITY");
                desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                executeAction(PSEvent.Set, desc1, dialogMode);
            }

            function step12(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                desc2.putString(PSKey.Name, "Dodge Control");
                desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                executeAction(PSEvent.Set, desc1, dialogMode);
            }

            function step13(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                desc1.putClass(PSKey.New, PSClass.Channel);
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSClass.Mask);
                desc1.putReference(PSKey.At, ref1);
                desc1.putEnumerated(PSKey.Using, PSType.UserMaskOptions, PSEnum.RevealAll);
                executeAction(PSEvent.Make, desc1, dialogMode);
            }

            function step14(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 50);
                desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                executeAction(PSEvent.Set, desc1, dialogMode);
            }

            function step15(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                desc2.putEnumerated(PSKey.Color, PSKey.Color, PSEnum.Gray);
                desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                executeAction(PSEvent.Set, desc1, dialogMode);
            }

            function step16(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putClass(PSClass.PaintbrushTool);
                desc1.putReference(PSString.Null, ref1);
                executeAction(PSEvent.Select, desc1, dialogMode);
            }

            function step17(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                desc2.putEnumerated(PSKey.Color, PSKey.Color, PSEnum.Gray);
                desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                executeAction(PSEvent.Set, desc1, dialogMode);
            }

            function step18(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putProperty(PSKey.Color, PSEnum.ForegroundColor);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                desc2.putUnitDouble(PSKey.Hue, PSUnit.Angle, 0);
                desc2.putDouble(PSKey.Start, 0);
                desc2.putDouble(PSKey.Brightness, 100);
                desc1.putObject(PSKey.To, PSClass.HSBColor, desc2);
                desc1.putString(PSKey.Source, "photoshopPicker");
                executeAction(PSEvent.Set, desc1, dialogMode);
            }

            function step19(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putProperty(PSKey.Color, PSEnum.BackgroundColor);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                desc2.putUnitDouble(PSKey.Hue, PSUnit.Angle, 0);
                desc2.putDouble(PSKey.Start, 0);
                desc2.putDouble(PSKey.Brightness, 0);
                desc1.putObject(PSKey.To, PSClass.HSBColor, desc2);
                desc1.putString(PSKey.Source, "photoshopPicker");
                executeAction(PSEvent.Set, desc1, dialogMode);
            }

            function step20(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putClass(PSClass.PaintbrushTool);
                desc1.putReference(PSString.Null, ref1);
                executeAction(PSEvent.Select, desc1, dialogMode);
            }

            function step21(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                executeAction(PSEvent.Invert, undefined, dialogMode);
            }

            function step22(enabled, withDialog) {
                if (enabled != undefined && !enabled) {
                    return;
                }
                var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                var desc1 = new ActionDescriptor();
                var ref1 = new ActionReference();
                ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                desc1.putReference(PSString.Null, ref1);
                var desc2 = new ActionDescriptor();
                desc2.putEnumerated(PSKey.Color, PSKey.Color, PSEnum.Violet);
                desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                executeAction(PSEvent.Set, desc1, dialogMode);
            }
            step1();
            step2();
            step3();
            step4();
            step5();
            step6();
            step7();
            step8();
            step9();
            step10();
            step11();
            step12();
            step13();
            step14();
            step15();
            step16();
            step17();
            step18();
            step19();
            step20();
            step21();
            step22();
        }
        cTID = function(s) {
            return app.charIDToTypeID(s);
        };
        sTID = function(s) {
            return app.stringIDToTypeID(s);
        };
        OnlyDodge.loadSymbols = function() {
            var dbgLevel = $.level;
            $.level = 0;
            try {
                PSConstants;
                return;
            } catch (e) {

            } finally {
                $.level = dbgLevel;
            }
            var needDefs = true;
            $.level = 0;
            try {
                PSClass;
                needDefs = false;
            } catch (e) {

            } finally {
                $.level = dbgLevel;
            }
            if (needDefs) {
                PSClass = function() {

                };
                PSEnum = function() {

                };
                PSEvent = function() {

                };
                PSForm = function() {

                };
                PSKey = function() {

                };
                PSType = function() {

                };
                PSUnit = function() {

                };
                PSString = function() {

                };
            }
            PSClass.AdjustmentLayer = cTID("AdjL");
            PSClass.BlendRange = cTID("Blnd");
            PSClass.Channel = cTID("Chnl");
            PSClass.Curves = cTID("Crvs");
            PSClass.HSBColor = cTID("HSBC");
            PSClass.Layer = cTID("Lyr ");
            PSClass.Mask = cTID("Msk ");
            PSClass.PaintbrushTool = cTID("PbTl");
            PSEnum.BackgroundColor = cTID("BckC");
            PSEnum.ForegroundColor = cTID("FrgC");
            PSEnum.Gray = cTID("Gry ");
            PSEnum.Merged = cTID("Mrgd");
            PSEnum.Multiply = cTID("Mltp");
            PSEnum.RGB = cTID("RGB ");
            PSEnum.RevealAll = cTID("RvlA");
            PSEnum.Screen = cTID("Scrn");
            PSEnum.Target = cTID("Trgt");
            PSEnum.Violet = cTID("Vlt ");
            PSEvent.Invert = cTID("Invr");
            PSEvent.Make = cTID("Mk  ");
            PSEvent.Select = cTID("slct");
            PSEvent.Set = cTID("setd");
            PSKey.At = cTID("At  ");
            PSKey.Brightness = cTID("Brgh");
            PSKey.Calculation = cTID("Clcl");
            PSKey.Color = cTID("Clr ");
            PSKey.DestBlackMax = cTID("Dstl");
            PSKey.DestBlackMin = cTID("DstB");
            PSKey.DestWhiteMax = cTID("Dstt");
            PSKey.DestWhiteMin = cTID("DstW");
            PSKey.From = cTID("From");
            PSKey.Hue = cTID("H   ");
            PSKey.LayerEffects = cTID("Lefx");
            PSKey.LayerID = cTID("LyrI");
            PSKey.MakeVisible = cTID("MkVs");
            PSKey.Mode = cTID("Md  ");
            PSKey.Name = cTID("Nm  ");
            PSKey.New = cTID("Nw  ");
            PSKey.Opacity = cTID("Opct");
            PSKey.PreserveTransparency = cTID("PrsT");
            PSKey.Scale = cTID("Scl ");
            PSKey.Source = cTID("Srce");
            PSKey.SrcBlackMax = cTID("Srcl");
            PSKey.SrcBlackMin = cTID("SrcB");
            PSKey.SrcWhiteMax = cTID("Srcm");
            PSKey.SrcWhiteMin = cTID("SrcW");
            PSKey.Start = cTID("Strt");
            PSKey.To = cTID("T   ");
            PSKey.Type = cTID("Type");
            PSKey.Using = cTID("Usng");
            PSKey.With = cTID("With");
            PSString.Null = sTID("null");
            PSString.addToSelectionContinuous = sTID("addToSelectionContinuous");
            PSString.layerGroup = sTID("layerSection");
            PSString.layerGroupEnd = sTID("layerSectionEnd");
            PSString.layerGroupStart = sTID("layerSectionStart");
            PSString.presetKind = sTID("presetKind");
            PSString.presetKindDefault = sTID("presetKindDefault");
            PSString.presetKindType = sTID("presetKindType");
            PSString.selectionModifier = sTID("selectionModifier");
            PSString.selectionModifierType = sTID("selectionModifierType");
            PSType.BlendMode = cTID("BlnM");
            PSType.Calculation = cTID("Clcn");
            PSType.Ordinal = cTID("Ordn");
            PSType.UserMaskOptions = cTID("UsrM");
            PSUnit.Angle = cTID("#Ang");
            PSUnit.Percent = cTID("#Prc");
        };
        OnlyDodge.loadSymbols();
        OnlyDodge.main = function() {
            OnlyDodge();
        };
        OnlyDodge.main();
    };
    bDGTXT = leftGr.add("group");
    bDGTXT.alignment = "left";
    DIGITALTXT = bDGTXT.add("button", undefined, "数码纹理");
    DIGITALTXT.preferredSize.width = b1L;
    DIGITALTXT.onClick = function() {
        close = true;
        win.close();
        if (app) {
            ErrStrs = {};
            ErrStrs.USER_CANCELED = localize("$$$/ScriptingSupport/Errors/UserCancelled");
            var historyStateNow = -1;
            do {
                historyStateNow++
            } while (app.activeDocument.activeHistoryState != app.activeDocument.historyStates[historyStateNow])
            try {
                app.activeDocument.suspendHistory(historyState, "Frezze()");
            } catch (e) {
                if (e.number != 8007) {
                    alert(e + " : " + e.line);
                }
            }
        }

        function Frezze() {
            function DigitalTexture() {
                function step1(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putClass(PSClass.Layer);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putString(PSKey.Name, "Digital Texture");
                    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Overlay);
                    desc2.putBoolean(PSKey.FillNeutral, true);
                    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
                    desc1.putInteger(PSKey.LayerID, 120);
                    executeAction(PSEvent.Make, desc1, dialogMode);
                }

                function step2(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    desc1.putEnumerated(PSKey.Distribution, PSKey.Distribution, PSEnum.GaussianDistribution);
                    desc1.putUnitDouble(PSKey.Noise, PSUnit.Percent, 30);
                    desc1.putBoolean(PSKey.Monochromatic, true);
                    desc1.putInteger(PSKey.FilterLayerRandomSeed, 1895438);
                    executeAction(sTID("addNoise"), desc1, dialogMode);
                }

                function step3(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 4);
                    executeAction(sTID("gaussianBlur"), desc1, dialogMode);
                }

                function step4(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    desc1.putUnitDouble(PSKey.Amount, PSUnit.Percent, 100);
                    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 4);
                    desc1.putInteger(PSKey.Threshold, 0);
                    executeAction(sTID("unsharpMask"), desc1, dialogMode);
                }

                function step5(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.SoftLight);
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step6(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 75);
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step7(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putString(PSKey.Name, "Big Digital Texture");
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step8(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putClass(PSClass.Layer);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putString(PSKey.Name, "Digital Texture");
                    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Overlay);
                    desc2.putBoolean(PSKey.FillNeutral, true);
                    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
                    desc1.putInteger(PSKey.LayerID, 120);
                    executeAction(PSEvent.Make, desc1, dialogMode);
                }

                function step9(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    desc1.putEnumerated(PSKey.Distribution, PSKey.Distribution, PSEnum.GaussianDistribution);
                    desc1.putUnitDouble(PSKey.Noise, PSUnit.Percent, 11);
                    desc1.putBoolean(PSKey.Monochromatic, true);
                    desc1.putInteger(PSKey.FilterLayerRandomSeed, 1895438);
                    executeAction(sTID("addNoise"), desc1, dialogMode);
                }

                function step10(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 2.2);
                    executeAction(sTID("gaussianBlur"), desc1, dialogMode);
                }

                function step11(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    desc1.putUnitDouble(PSKey.Amount, PSUnit.Percent, 200);
                    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 2.7);
                    desc1.putInteger(PSKey.Threshold, 0);
                    executeAction(sTID("unsharpMask"), desc1, dialogMode);
                }

                function step12(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.SoftLight);
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step13(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 75);
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step14(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putString(PSKey.Name, "Medium Digital Texture");
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step15(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putClass(PSClass.Layer);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putString(PSKey.Name, "Digital Texture");
                    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Overlay);
                    desc2.putBoolean(PSKey.FillNeutral, true);
                    desc1.putObject(PSKey.Using, PSClass.Layer, desc2);
                    desc1.putInteger(PSKey.LayerID, 120);
                    executeAction(PSEvent.Make, desc1, dialogMode);
                }

                function step16(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    desc1.putEnumerated(PSKey.Distribution, PSKey.Distribution, PSEnum.GaussianDistribution);
                    desc1.putUnitDouble(PSKey.Noise, PSUnit.Percent, 5);
                    desc1.putBoolean(PSKey.Monochromatic, true);
                    desc1.putInteger(PSKey.FilterLayerRandomSeed, 1895438);
                    executeAction(sTID("addNoise"), desc1, dialogMode);
                }

                function step17(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 0.5);
                    executeAction(sTID("gaussianBlur"), desc1, dialogMode);
                }

                function step18(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    desc1.putUnitDouble(PSKey.Amount, PSUnit.Percent, 200);
                    desc1.putUnitDouble(PSKey.Radius, PSUnit.Pixels, 2.7);
                    desc1.putInteger(PSKey.Threshold, 0);
                    executeAction(sTID("unsharpMask"), desc1, dialogMode);
                }

                function step19(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.SoftLight);
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step20(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putString(PSKey.Name, "Small Digital Texture");
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step21(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putName(PSClass.Layer, "Big Digital Texture");
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
                    desc1.putBoolean(PSKey.MakeVisible, false);
                    var list1 = new ActionList();
                    list1.putInteger(45);
                    list1.putInteger(sTID("skinTone"), 46);
                    list1.putInteger(sTID("contentAware"), 47);
                    desc1.putList(PSKey.LayerID, list1);
                    executeAction(PSEvent.Select, desc1, dialogMode);
                }

                function step22(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putClass(PSString.layerGroup);
                    desc1.putReference(PSString.Null, ref1);
                    var ref2 = new ActionReference();
                    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSKey.From, ref2);
                    desc1.putInteger(PSString.layerGroupStart, 41);
                    desc1.putInteger(PSString.layerGroupEnd, 42);
                    desc1.putString(PSKey.Name, "Group 1");
                    executeAction(PSEvent.Make, desc1, dialogMode);
                }

                function step23(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putBoolean(PSKey.MakeVisible, false);
                    executeAction(PSEvent.Select, desc1, dialogMode);
                }

                function step24(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putString(PSKey.Name, "Digital Texture");
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step25(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSEnum.Violet);
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step26(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    desc1.putClass(PSKey.New, PSClass.Channel);
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSClass.Mask);
                    desc1.putReference(PSKey.At, ref1);
                    desc1.putEnumerated(PSKey.Using, PSType.UserMaskOptions, PSEnum.HideAll);
                    executeAction(PSEvent.Make, desc1, dialogMode);
                }

                function step27(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putProperty(PSKey.Color, PSEnum.ForegroundColor);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putUnitDouble(PSKey.Hue, PSUnit.Angle, 0);
                    desc2.putDouble(PSKey.Start, 0);
                    desc2.putDouble(PSKey.Brightness, 100);
                    desc1.putObject(PSKey.To, PSClass.HSBColor, desc2);
                    desc1.putString(PSKey.Source, "photoshopPicker");
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step28(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putProperty(PSKey.Color, PSEnum.BackgroundColor);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putUnitDouble(PSKey.Hue, PSUnit.Angle, 0);
                    desc2.putDouble(PSKey.Start, 0);
                    desc2.putDouble(PSKey.Brightness, 0);
                    desc1.putObject(PSKey.To, PSClass.HSBColor, desc2);
                    desc1.putString(PSKey.Source, "photoshopPicker");
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step29(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putClass(PSClass.PaintbrushTool);
                    desc1.putReference(PSString.Null, ref1);
                    executeAction(PSEvent.Select, desc1, dialogMode);
                }
                step1();
                step2();
                step3();
                step4();
                step5();
                step6();
                step7();
                step8();
                step9();
                step10();
                step11();
                step12();
                step13();
                step14();
                step15();
                step16();
                step17();
                step18();
                step19();
                step20();
                step21();
                step22();
                step23();
                step24();
                step25();
                step26();
                step27();
                step28();
                step29();
            }
            cTID = function(s) {
                return app.charIDToTypeID(s);
            };
            sTID = function(s) {
                return app.stringIDToTypeID(s);
            };
            DigitalTexture.loadSymbols = function() {
                var dbgLevel = $.level;
                $.level = 0;
                try {
                    PSConstants;
                    return;
                } catch (e) {

                } finally {
                    $.level = dbgLevel;
                }
                var needDefs = true;
                $.level = 0;
                try {
                    PSClass;
                    needDefs = false;
                } catch (e) {

                } finally {
                    $.level = dbgLevel;
                }
                if (needDefs) {
                    PSClass = function() {

                    };
                    PSEnum = function() {

                    };
                    PSEvent = function() {

                    };
                    PSForm = function() {

                    };
                    PSKey = function() {

                    };
                    PSType = function() {

                    };
                    PSUnit = function() {

                    };
                    PSString = function() {

                    };
                }
                PSClass.Channel = cTID("Chnl");
                PSClass.HSBColor = cTID("HSBC");
                PSClass.Layer = cTID("Lyr ");
                PSClass.Mask = cTID("Msk ");
                PSClass.PaintbrushTool = cTID("PbTl");
                PSEnum.BackgroundColor = cTID("BckC");
                PSEnum.ForegroundColor = cTID("FrgC");
                PSEnum.GaussianDistribution = cTID("Gsn ");
                PSEnum.HideAll = cTID("HdAl");
                PSEnum.Overlay = cTID("Ovrl");
                PSEnum.RGB = cTID("RGB ");
                PSEnum.SoftLight = cTID("SftL");
                PSEnum.Target = cTID("Trgt");
                PSEnum.Violet = cTID("Vlt ");
                PSEvent.Make = cTID("Mk  ");
                PSEvent.Select = cTID("slct");
                PSEvent.Set = cTID("setd");
                PSKey.Amount = cTID("Amnt");
                PSKey.At = cTID("At  ");
                PSKey.Brightness = cTID("Brgh");
                PSKey.Color = cTID("Clr ");
                PSKey.Distribution = cTID("Dstr");
                PSKey.FillNeutral = cTID("FlNt");
                PSKey.FilterLayerRandomSeed = cTID("FlRs");
                PSKey.From = cTID("From");
                PSKey.Hue = cTID("H   ");
                PSKey.LayerID = cTID("LyrI");
                PSKey.MakeVisible = cTID("MkVs");
                PSKey.Mode = cTID("Md  ");
                PSKey.Monochromatic = cTID("Mnch");
                PSKey.Name = cTID("Nm  ");
                PSKey.New = cTID("Nw  ");
                PSKey.Noise = cTID("Nose");
                PSKey.Opacity = cTID("Opct");
                PSKey.Radius = cTID("Rds ");
                PSKey.Source = cTID("Srce");
                PSKey.Start = cTID("Strt");
                PSKey.Threshold = cTID("Thsh");
                PSKey.To = cTID("T   ");
                PSKey.Using = cTID("Usng");
                PSString.Null = sTID("null");
                PSString.addToSelectionContinuous = sTID("addToSelectionContinuous");
                PSString.layerGroup = sTID("layerSection");
                PSString.layerGroupEnd = sTID("layerSectionEnd");
                PSString.layerGroupStart = sTID("layerSectionStart");
                PSString.selectionModifier = sTID("selectionModifier");
                PSString.selectionModifierType = sTID("selectionModifierType");
                PSType.BlendMode = cTID("BlnM");
                PSType.Ordinal = cTID("Ordn");
                PSType.UserMaskOptions = cTID("UsrM");
                PSUnit.Angle = cTID("#Ang");
                PSUnit.Percent = cTID("#Prc");
                PSUnit.Pixels = cTID("#Pxl");
            };
            DigitalTexture.loadSymbols();
            DigitalTexture.main = function() {
                DigitalTexture();
            };
            DigitalTexture.main();
        }
    };
    bRSP = leftGr.add("group");
    bRSP.alignment = "left";
    RSP = bRSP.add("button", undefined, "修饰肤色");
    RSP.preferredSize.width = b1L;
    RSP.onClick = function() {
        close = true;
        win.close();
        if (app) {
            try {
                MC();
            } catch (e) {

            }
        }

        function MC() {
            Main_Name = app.activeDocument.name;
            var idDplc = charIDToTypeID("Dplc");
            var desc3534 = new ActionDescriptor();
            var idnull = charIDToTypeID("null");
            var ref662 = new ActionReference();
            var idDcmn = charIDToTypeID("Dcmn");
            var idOrdn = charIDToTypeID("Ordn");
            var idFrst = charIDToTypeID("Frst");
            ref662.putEnumerated(idDcmn, idOrdn, idFrst);
            desc3534.putReference(idnull, ref662);
            var idNm = charIDToTypeID("Nm  ");
            desc3534.putString(idNm, "TEMP");
            var idMrgd = charIDToTypeID("Mrgd");
            desc3534.putBoolean(idMrgd, true);
            executeAction(idDplc, desc3534, DialogModes.NO);

            function SkinPigmentcopy() {
                function step1(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putClass(PSString.layerGroup);
                    desc1.putReference(PSString.Null, ref1);
                    executeAction(PSEvent.Make, desc1, dialogMode);
                }

                function step2(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSEnum.Blue);
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step3(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putBoolean(PSKey.MakeVisible, false);
                    executeAction(PSEvent.Select, desc1, dialogMode);
                }

                function step4(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putString(PSKey.Name, "Skin Pigment");
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step5(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putClass(PSClass.Layer);
                    desc1.putReference(PSString.Null, ref1);
                    executeAction(PSEvent.Make, desc1, dialogMode);
                }

                function step6(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putString(PSKey.Name, "5 px");
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step7(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Multiply);
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step8(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putProperty(PSKey.Color, PSKey.Colors);
                    desc1.putReference(PSString.Null, ref1);
                    executeAction(PSEvent.Reset, desc1, dialogMode);
                }

                function step9(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putProperty(PSKey.Color, PSKey.Colors);
                    desc1.putReference(PSString.Null, ref1);
                    executeAction(PSEvent.Exchange, desc1, dialogMode);
                }

                function step10(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    desc1.putEnumerated(PSKey.Using, PSType.FillContents, PSEnum.ForegroundColor);
                    desc1.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 100);
                    desc1.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Normal);
                    executeAction(PSEvent.Fill, desc1, dialogMode);
                }

                function step11(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    desc1.putEnumerated(PSKey.Distribution, PSKey.Distribution, PSEnum.GaussianDistribution);
                    desc1.putUnitDouble(PSKey.Noise, PSUnit.Percent, 15);
                    desc1.putBoolean(PSKey.Monochromatic, true);
                    desc1.putInteger(PSKey.FilterLayerRandomSeed, 2533976);
                    executeAction(sTID("addNoise"), desc1, dialogMode);
                }

                function step12(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putEnumerated(PSKey.FreeTransformCenterState, PSType.QuadCenterState, PSEnum.QCSAverage);
                    var desc2 = new ActionDescriptor();
                    desc2.putUnitDouble(PSKey.Horizontal, PSUnit.Pixels, -0.5);
                    desc2.putUnitDouble(PSKey.Vertical, PSUnit.Pixels, -0.5);
                    desc1.putObject(PSKey.Offset, PSKey.Offset, desc2);
                    desc1.putUnitDouble(PSKey.Width, PSUnit.Percent, 228.857142857143);
                    desc1.putUnitDouble(PSKey.Height, PSUnit.Percent, 228.863636363636);
                    desc1.putEnumerated(PSKey.Interpolation, PSType.Interpolation, PSEnum.Bicubic);
                    executeAction(PSEvent.Transform, desc1, dialogMode);
                }

                function step13(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putProperty(PSClass.Channel, PSString.selection);
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.All);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step14(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    desc1.putClass(PSKey.New, PSClass.Channel);
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSClass.Mask);
                    desc1.putReference(PSKey.At, ref1);
                    desc1.putEnumerated(PSKey.Using, PSType.UserMaskOptions, PSEnum.RevealSelection);
                    executeAction(PSEvent.Make, desc1, dialogMode);
                }

                function step15(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Channel, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putBoolean(PSKey.Apply, true);
                    executeAction(PSEvent.Delete, desc1, dialogMode);
                }

                function step16(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putProperty(PSClass.Channel, PSString.selection);
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step17(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putInteger(PSClass.Version, 5);
                    executeAction(PSEvent.Duplicate, desc1, dialogMode);
                }

                function step18(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putString(PSKey.Name, "10 px");
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step19(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Multiply);
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step20(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 70);
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step21(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putProperty(PSClass.Channel, PSString.selection);
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.All);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step22(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putEnumerated(PSKey.FreeTransformCenterState, PSType.QuadCenterState, PSEnum.QCSAverage);
                    var desc2 = new ActionDescriptor();
                    desc2.putUnitDouble(PSKey.Horizontal, PSUnit.Pixels, 0.5);
                    desc2.putUnitDouble(PSKey.Vertical, PSUnit.Pixels, 0);
                    desc1.putObject(PSKey.Offset, PSKey.Offset, desc2);
                    desc1.putUnitDouble(PSKey.Width, PSUnit.Percent, 216.223958333333);
                    desc1.putUnitDouble(PSKey.Height, PSUnit.Percent, 216.215277777778);
                    desc1.putEnumerated(PSKey.Interpolation, PSType.Interpolation, PSEnum.Bicubic);
                    executeAction(PSEvent.Transform, desc1, dialogMode);
                }

                function step23(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putProperty(PSClass.Channel, PSString.selection);
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.All);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step24(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    desc1.putClass(PSKey.New, PSClass.Channel);
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSClass.Mask);
                    desc1.putReference(PSKey.At, ref1);
                    desc1.putEnumerated(PSKey.Using, PSType.UserMaskOptions, PSEnum.RevealSelection);
                    executeAction(PSEvent.Make, desc1, dialogMode);
                }

                function step25(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Channel, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putBoolean(PSKey.Apply, true);
                    executeAction(PSEvent.Delete, desc1, dialogMode);
                }

                function step26(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putProperty(PSClass.Channel, PSString.selection);
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step27(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putInteger(PSClass.Version, 5);
                    executeAction(PSEvent.Duplicate, desc1, dialogMode);
                }

                function step28(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putString(PSKey.Name, "15 px");
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step29(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Multiply);
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step30(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 70);
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step31(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putProperty(PSClass.Channel, PSString.selection);
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.All);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step32(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putEnumerated(PSKey.FreeTransformCenterState, PSType.QuadCenterState, PSEnum.QCSAverage);
                    var desc2 = new ActionDescriptor();
                    desc2.putUnitDouble(PSKey.Horizontal, PSUnit.Pixels, 0);
                    desc2.putUnitDouble(PSKey.Vertical, PSUnit.Pixels, 0);
                    desc1.putObject(PSKey.Offset, PSKey.Offset, desc2);
                    desc1.putUnitDouble(PSKey.Width, PSUnit.Percent, 192.5);
                    desc1.putUnitDouble(PSKey.Height, PSUnit.Percent, 192.5);
                    desc1.putEnumerated(PSKey.Interpolation, PSType.Interpolation, PSEnum.Bicubic);
                    executeAction(PSEvent.Transform, desc1, dialogMode);
                }

                function step33(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putProperty(PSClass.Channel, PSString.selection);
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.All);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step34(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    desc1.putClass(PSKey.New, PSClass.Channel);
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSClass.Mask);
                    desc1.putReference(PSKey.At, ref1);
                    desc1.putEnumerated(PSKey.Using, PSType.UserMaskOptions, PSEnum.RevealSelection);
                    executeAction(PSEvent.Make, desc1, dialogMode);
                }

                function step35(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Channel, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putBoolean(PSKey.Apply, true);
                    executeAction(PSEvent.Delete, desc1, dialogMode);
                }

                function step36(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putProperty(PSClass.Channel, PSString.selection);
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.None);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step37(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putProperty(PSClass.Channel, PSString.selection);
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.All);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step38(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    executeAction(sTID("copyToLayer"), undefined, dialogMode);
                }

                function step39(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putString(PSKey.Name, "20 px");
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step40(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putEnumerated(PSKey.FreeTransformCenterState, PSType.QuadCenterState, PSEnum.QCSAverage);
                    var desc2 = new ActionDescriptor();
                    desc2.putUnitDouble(PSKey.Horizontal, PSUnit.Distance, -0.72);
                    desc2.putUnitDouble(PSKey.Vertical, PSUnit.Distance, -0.72);
                    desc1.putObject(PSKey.Offset, PSKey.Offset, desc2);
                    desc1.putUnitDouble(PSKey.Width, PSUnit.Percent, 162.614468864469);
                    desc1.putUnitDouble(PSKey.Height, PSUnit.Percent, 162.603021978022);
                    desc1.putEnumerated(PSKey.Interpolation, PSType.Interpolation, PSEnum.Bicubic);
                    executeAction(PSEvent.Transform, desc1, dialogMode);
                }

                function step41(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putProperty(PSClass.Channel, PSString.selection);
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putEnumerated(PSKey.To, PSType.Ordinal, PSEnum.All);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step42(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    desc1.putClass(PSKey.New, PSClass.Channel);
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSClass.Mask);
                    desc1.putReference(PSKey.At, ref1);
                    desc1.putEnumerated(PSKey.Using, PSType.UserMaskOptions, PSEnum.RevealSelection);
                    executeAction(PSEvent.Make, desc1, dialogMode);
                }

                function step43(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Channel, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putBoolean(PSKey.Apply, true);
                    executeAction(PSEvent.Delete, desc1, dialogMode);
                }

                function step44(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putUnitDouble(PSKey.Opacity, PSUnit.Percent, 40);
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step45(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var list1 = new ActionList();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    list1.putReference(ref1);
                    desc1.putList(PSString.Null, list1);
                    executeAction(PSEvent.Hide, desc1, dialogMode);
                }

                function step46(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putName(PSClass.Layer, "20 px");
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putBoolean(PSKey.MakeVisible, false);
                    executeAction(PSEvent.Select, desc1, dialogMode);
                }

                function step47(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putName(PSClass.Layer, "5 px");
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putEnumerated(PSString.selectionModifier, PSString.selectionModifierType, PSString.addToSelectionContinuous);
                    desc1.putBoolean(PSKey.MakeVisible, false);
                    executeAction(PSEvent.Select, desc1, dialogMode);
                }

                function step48(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putClass(PSString.layerGroup);
                    desc1.putReference(PSString.Null, ref1);
                    var ref2 = new ActionReference();
                    ref2.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSKey.From, ref2);
                    var desc2 = new ActionDescriptor();
                    desc2.putEnumerated(PSKey.Color, PSKey.Color, PSEnum.Blue);
                    desc1.putObject(PSKey.Using, PSString.layerGroup, desc2);
                    executeAction(PSEvent.Make, desc1, dialogMode);
                }

                function step49(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putString(PSKey.Name, "Noise");
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step50(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putEnumerated(PSKey.Mode, PSType.BlendMode, PSEnum.Multiply);
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step51(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putName(PSClass.Layer, "Skin Pigment");
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putBoolean(PSKey.MakeVisible, false);
                    executeAction(PSEvent.Select, desc1, dialogMode);
                }

                function step52(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putClass(PSClass.AdjustmentLayer);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    var desc3 = new ActionDescriptor();
                    desc3.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
                    desc3.putBoolean(PSKey.Colorize, false);
                    desc2.putObject(PSKey.Type, PSClass.HueSaturation, desc3);
                    desc1.putObject(PSKey.Using, PSClass.AdjustmentLayer, desc2);
                    executeAction(PSEvent.Make, desc1, dialogMode);
                }

                function step53(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    executeAction(sTID("groupEvent"), desc1, dialogMode);
                }

                function step54(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putBoolean(PSKey.MakeVisible, false);
                    executeAction(PSEvent.Select, desc1, dialogMode);
                }

                function step55(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putString(PSKey.Name, "Edit");
                    desc1.putObject(PSKey.To, PSClass.Layer, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step56(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    var list1 = new ActionList();
                    var desc3 = new ActionDescriptor();
                    desc3.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
                    desc3.putInteger(PSKey.Hue, 30);
                    desc3.putInteger(PSKey.Start, 80);
                    desc3.putInteger(PSKey.Lightness, 85);
                    list1.putObject(PSClass.HueSatAdjustmentV2, desc3);
                    desc2.putList(PSKey.Adjustment, list1);
                    desc1.putObject(PSKey.To, PSClass.HueSaturation, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step57(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSClass.Mask);
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putBoolean(PSKey.MakeVisible, false);
                    executeAction(PSEvent.Select, desc1, dialogMode);
                }

                function step58(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Channel, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    executeAction(PSEvent.Delete, desc1, dialogMode);
                }

                function step59(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    desc2.putBoolean(PSKey.Colorize, true);
                    var list1 = new ActionList();
                    var desc3 = new ActionDescriptor();
                    desc3.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
                    desc3.putInteger(PSKey.Hue, 0);
                    desc3.putInteger(PSKey.Start, 25);
                    desc3.putInteger(PSKey.Lightness, 0);
                    list1.putObject(PSClass.HueSatAdjustmentV2, desc3);
                    desc2.putList(PSKey.Adjustment, list1);
                    desc1.putObject(PSKey.To, PSClass.HueSaturation, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step60(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
                    desc1.putReference(PSString.Null, ref1);
                    var desc2 = new ActionDescriptor();
                    var list1 = new ActionList();
                    var desc3 = new ActionDescriptor();
                    desc3.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
                    desc3.putInteger(PSKey.Hue, 30);
                    desc3.putInteger(PSKey.Start, 70);
                    desc3.putInteger(PSKey.Lightness, 85);
                    list1.putObject(PSClass.HueSatAdjustmentV2, desc3);
                    desc2.putList(PSKey.Adjustment, list1);
                    desc1.putObject(PSKey.To, PSClass.HueSaturation, desc2);
                    executeAction(PSEvent.Set, desc1, dialogMode);
                }

                function step61(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putName(PSClass.Layer, "Noise");
                    desc1.putReference(PSString.Null, ref1);
                    desc1.putBoolean(PSKey.MakeVisible, false);
                    executeAction(PSEvent.Select, desc1, dialogMode);
                }

                function step62(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    desc1.putClass(PSKey.New, PSClass.Channel);
                    var ref1 = new ActionReference();
                    ref1.putEnumerated(PSClass.Channel, PSClass.Channel, PSClass.Mask);
                    desc1.putReference(PSKey.At, ref1);
                    desc1.putEnumerated(PSKey.Using, PSType.UserMaskOptions, PSEnum.HideAll);
                    executeAction(PSEvent.Make, desc1, dialogMode);
                }

                function step63(enabled, withDialog) {
                    if (enabled != undefined && !enabled) {
                        return;
                    }
                    var dialogMode = withDialog ? DialogModes.ALL : DialogModes.NO;
                    var desc1 = new ActionDescriptor();
                    var ref1 = new ActionReference();
                    ref1.putClass(PSClass.PaintbrushTool);
                    desc1.putReference(PSString.Null, ref1);
                    executeAction(PSEvent.Select, desc1, dialogMode);
                }
                step1();
                step2();
                step3();
                step4();
                step5();
                step6();
                step7();
                step8();
                step9();
                step10();
                step11();
                step12();
                step13();
                step14();
                step15();
                step16();
                step17();
                step18();
                step19();
                step20();
                step21();
                step22();
                step23();
                step24();
                step25();
                step26();
                step27();
                step28();
                step29();
                step30();
                step31();
                step32();
                step33();
                step34();
                step35();
                step36();
                step37();
                step38();
                step39();
                step40();
                step41();
                step42();
                step43();
                step44();
                step45();
                step46();
                step47();
                step48();
                step49();
                step50();
                step51();
                step52();
                step53();
                step54();
                step55();
                step56();
                step57();
                step58();
                step59();
                step60(true, true);
                step61();
                step62();
                step63();
            }
            cTID = function(s) {
                return app.charIDToTypeID(s);
            };
            sTID = function(s) {
                return app.stringIDToTypeID(s);
            };
            SkinPigmentcopy.loadSymbols = function() {
                var dbgLevel = $.level;
                $.level = 0;
                try {
                    PSConstants;
                    return;
                } catch (e) {

                } finally {
                    $.level = dbgLevel;
                }
                var needDefs = true;
                $.level = 0;
                try {
                    PSClass;
                    needDefs = false;
                } catch (e) {

                } finally {
                    $.level = dbgLevel;
                }
                if (needDefs) {
                    PSClass = function() {

                    };
                    PSEnum = function() {

                    };
                    PSEvent = function() {

                    };
                    PSForm = function() {

                    };
                    PSKey = function() {

                    };
                    PSType = function() {

                    };
                    PSUnit = function() {

                    };
                    PSString = function() {

                    };
                }
                PSClass.AdjustmentLayer = cTID("AdjL");
                PSClass.Channel = cTID("Chnl");
                PSClass.HueSatAdjustmentV2 = cTID("Hst2");
                PSClass.HueSaturation = cTID("HStr");
                PSClass.Layer = cTID("Lyr ");
                PSClass.Mask = cTID("Msk ");
                PSClass.PaintbrushTool = cTID("PbTl");
                PSClass.Version = cTID("Vrsn");
                PSEnum.All = cTID("Al  ");
                PSEnum.Bicubic = cTID("Bcbc");
                PSEnum.Blue = cTID("Bl  ");
                PSEnum.Composite = cTID("Cmps");
                PSEnum.ForegroundColor = cTID("FrgC");
                PSEnum.GaussianDistribution = cTID("Gsn ");
                PSEnum.HideAll = cTID("HdAl");
                PSEnum.Multiply = cTID("Mltp");
                PSEnum.None = cTID("None");
                PSEnum.Normal = cTID("Nrml");
                PSEnum.QCSAverage = cTID("Qcsa");
                PSEnum.RGB = cTID("RGB ");
                PSEnum.RevealSelection = cTID("RvlS");
                PSEnum.Target = cTID("Trgt");
                PSEvent.Delete = cTID("Dlt ");
                PSEvent.Duplicate = cTID("Dplc");
                PSEvent.Exchange = cTID("Exch");
                PSEvent.Fill = cTID("Fl  ");
                PSEvent.Hide = cTID("Hd  ");
                PSEvent.Make = cTID("Mk  ");
                PSEvent.Reset = cTID("Rset");
                PSEvent.Select = cTID("slct");
                PSEvent.Set = cTID("setd");
                PSEvent.Transform = cTID("Trnf");
                PSKey.Adjustment = cTID("Adjs");
                PSKey.Apply = cTID("Aply");
                PSKey.At = cTID("At  ");
                PSKey.Color = cTID("Clr ");
                PSKey.Colorize = cTID("Clrz");
                PSKey.Colors = cTID("Clrs");
                PSKey.Distribution = cTID("Dstr");
                PSKey.FilterLayerRandomSeed = cTID("FlRs");
                PSKey.FreeTransformCenterState = cTID("FTcs");
                PSKey.From = cTID("From");
                PSKey.Height = cTID("Hght");
                PSKey.Horizontal = cTID("Hrzn");
                PSKey.Hue = cTID("H   ");
                PSKey.Interpolation = cTID("Intr");
                PSKey.Lightness = cTID("Lght");
                PSKey.MakeVisible = cTID("MkVs");
                PSKey.Mode = cTID("Md  ");
                PSKey.Monochromatic = cTID("Mnch");
                PSKey.Name = cTID("Nm  ");
                PSKey.New = cTID("Nw  ");
                PSKey.Noise = cTID("Nose");
                PSKey.Offset = cTID("Ofst");
                PSKey.Opacity = cTID("Opct");
                PSKey.Start = cTID("Strt");
                PSKey.To = cTID("T   ");
                PSKey.Type = cTID("Type");
                PSKey.Using = cTID("Usng");
                PSKey.Vertical = cTID("Vrtc");
                PSKey.Width = cTID("Wdth");
                PSString.Null = sTID("null");
                PSString.addToSelectionContinuous = sTID("addToSelectionContinuous");
                PSString.layerGroup = sTID("layerSection");
                PSString.presetKind = sTID("presetKind");
                PSString.presetKindDefault = sTID("presetKindDefault");
                PSString.presetKindType = sTID("presetKindType");
                PSString.selection = sTID("selection");
                PSString.selectionModifier = sTID("selectionModifier");
                PSString.selectionModifierType = sTID("selectionModifierType");
                PSType.BlendMode = cTID("BlnM");
                PSType.FillContents = cTID("FlCn");
                PSType.Interpolation = cTID("Intp");
                PSType.Ordinal = cTID("Ordn");
                PSType.QuadCenterState = cTID("QCSt");
                PSType.UserMaskOptions = cTID("UsrM");
                PSUnit.Distance = cTID("#Rlt");
                PSUnit.Percent = cTID("#Prc");
                PSUnit.Pixels = cTID("#Pxl");
            };
            SkinPigmentcopy.loadSymbols();
            SkinPigmentcopy.main = function() {
                SkinPigmentcopy();
            };
            SkinPigmentcopy.main();
            docRef = app.activeDocument;
            var DH = docRef.height.as("px");
            var DW = docRef.width.as("px");
            var idCrop = charIDToTypeID("Crop");
            var desc3540 = new ActionDescriptor();
            var idT = charIDToTypeID("T   ");
            var desc3541 = new ActionDescriptor();
            var idTop = charIDToTypeID("Top ");
            var idPxl = charIDToTypeID("#Pxl");
            desc3541.putUnitDouble(idTop, idPxl, 0);
            var idLeft = charIDToTypeID("Left");
            var idPxl = charIDToTypeID("#Pxl");
            desc3541.putUnitDouble(idLeft, idPxl, 0);
            var idBtom = charIDToTypeID("Btom");
            var idPxl = charIDToTypeID("#Pxl");
            desc3541.putUnitDouble(idBtom, idPxl, DH);
            var idRght = charIDToTypeID("Rght");
            var idPxl = charIDToTypeID("#Pxl");
            desc3541.putUnitDouble(idRght, idPxl, DW);
            var idRctn = charIDToTypeID("Rctn");
            desc3540.putObject(idT, idRctn, desc3541);
            var idAngl = charIDToTypeID("Angl");
            var idAng = charIDToTypeID("#Ang");
            desc3540.putUnitDouble(idAngl, idAng, 0);
            var idDlt = charIDToTypeID("Dlt ");
            desc3540.putBoolean(idDlt, true);
            var idcropAspectRatioModeKey = stringIDToTypeID("cropAspectRatioModeKey");
            var idcropAspectRatioModeClass = stringIDToTypeID("cropAspectRatioModeClass");
            var idtargetSize = stringIDToTypeID("targetSize");
            desc3540.putEnumerated(idcropAspectRatioModeKey, idcropAspectRatioModeClass, idtargetSize);
            executeAction(idCrop, desc3540, DialogModes.NO);
            var idslct = charIDToTypeID("slct");
            var desc3855 = new ActionDescriptor();
            var idnull = charIDToTypeID("null");
            var ref826 = new ActionReference();
            var idLyr = charIDToTypeID("Lyr ");
            ref826.putName(idLyr, "Skin Pigment");
            desc3855.putReference(idnull, ref826);
            var idMkVs = charIDToTypeID("MkVs");
            desc3855.putBoolean(idMkVs, false);
            var idLyrI = charIDToTypeID("LyrI");
            var list343 = new ActionList();
            list343.putInteger(2);
            desc3855.putList(idLyrI, list343);
            executeAction(idslct, desc3855, DialogModes.NO);
            var idDplc = charIDToTypeID("Dplc");
            var desc3859 = new ActionDescriptor();
            var idnull = charIDToTypeID("null");
            var ref827 = new ActionReference();
            var idLyr = charIDToTypeID("Lyr ");
            var idOrdn = charIDToTypeID("Ordn");
            var idTrgt = charIDToTypeID("Trgt");
            ref827.putEnumerated(idLyr, idOrdn, idTrgt);
            desc3859.putReference(idnull, ref827);
            var idT = charIDToTypeID("T   ");
            var ref828 = new ActionReference();
            var idDcmn = charIDToTypeID("Dcmn");
            ref828.putName(idDcmn, Main_Name);
            desc3859.putReference(idT, ref828);
            var idNm = charIDToTypeID("Nm  ");
            desc3859.putString(idNm, "Skin Pigment");
            var idVrsn = charIDToTypeID("Vrsn");
            desc3859.putInteger(idVrsn, 5);
            var idIdnt = charIDToTypeID("Idnt");
            var list344 = new ActionList();
            list344.putInteger(140);
            list344.putInteger(141);
            list344.putInteger(142);
            list344.putInteger(143);
            list344.putInteger(144);
            list344.putInteger(145);
            list344.putInteger(146);
            list344.putInteger(147);
            list344.putInteger(148);
            desc3859.putList(idIdnt, list344);
            executeAction(idDplc, desc3859, DialogModes.NO);
            var idCls = charIDToTypeID("Cls ");
            var desc3549 = new ActionDescriptor();
            var idSvng = charIDToTypeID("Svng");
            var idYsN = charIDToTypeID("YsN ");
            var idN = charIDToTypeID("N   ");
            desc3549.putEnumerated(idSvng, idYsN, idN);
            var idDocI = charIDToTypeID("DocI");
            desc3549.putInteger(idDocI, 1884);
            var idforceNotify = stringIDToTypeID("forceNotify");
            desc3549.putBoolean(idforceNotify, true);
            executeAction(idCls, desc3549, DialogModes.NO);
            var idslct = charIDToTypeID("slct");
            var desc704 = new ActionDescriptor();
            var idnull = charIDToTypeID("null");
            var ref146 = new ActionReference();
            var idDcmn = charIDToTypeID("Dcmn");
            ref146.putName(idDcmn, Main_Name);
            desc704.putReference(idnull, ref146);
            var idDocI = charIDToTypeID("DocI");
            desc704.putInteger(idDocI, 922);
            executeAction(idslct, desc704, DialogModes.NO);
            var idslct = charIDToTypeID("slct");
            var desc31 = new ActionDescriptor();
            var idnull = charIDToTypeID("null");
            var ref11 = new ActionReference();
            var idLyr = charIDToTypeID("Lyr ");
            var idOrdn = charIDToTypeID("Ordn");
            var idBckw = charIDToTypeID("Bckw");
            ref11.putEnumerated(idLyr, idOrdn, idBckw);
            desc31.putReference(idnull, ref11);
            var idMkVs = charIDToTypeID("MkVs");
            desc31.putBoolean(idMkVs, false);
            var idLyrI = charIDToTypeID("LyrI");
            var list9 = new ActionList();
            list9.putInteger(18);
            desc31.putList(idLyrI, list9);
            executeAction(idslct, desc31, DialogModes.NO);
            var idslct = charIDToTypeID("slct");
            var desc32 = new ActionDescriptor();
            var idnull = charIDToTypeID("null");
            var ref12 = new ActionReference();
            var idLyr = charIDToTypeID("Lyr ");
            var idOrdn = charIDToTypeID("Ordn");
            var idBckw = charIDToTypeID("Bckw");
            ref12.putEnumerated(idLyr, idOrdn, idBckw);
            desc32.putReference(idnull, ref12);
            var idMkVs = charIDToTypeID("MkVs");
            desc32.putBoolean(idMkVs, false);
            var idLyrI = charIDToTypeID("LyrI");
            var list10 = new ActionList();
            list10.putInteger(17);
            desc32.putList(idLyrI, list10);
            executeAction(idslct, desc32, DialogModes.NO);
        }
    };
    closeBtn = leftGr.add("button", undefined, "关闭");
    closeBtn.alignment = "left";
    closeBtn.preferredSize.width = b1L;
    close = false;
    closeBtn.onClick = function() {
        close = true;
        win.close();
    };
    win.onClose = function() {
        close = true;
    };
    win.show();
    while (close === false) {
        app.refresh();
    }
}