12 Replies Latest reply on Jun 6, 2018 8:14 PM by ANCHINGO

    How to make selection auto

    ANCHINGO Level 1

      Hello all,

       

      I have a image bellow, I want make selection window auto. I tried in many ways but not effective.8a.jpg

       

      Please help me!

      Thank in advance!

        • 1. Re: How to make selection auto
          ANCHINGO Level 1

          It seems nobody helped my problem ~~

          • 2. Re: How to make selection auto
            JJMack Most Valuable Participant

            I think the only auto selection function Photoshop has that I know of is select subject and that feature is not perfect and would not select your window. None of Photoshop selection tools would auto select windows in an image.  I think you have seen this for none of the things you tried came close.

            1 person found this helpful
            • 3. Re: How to make selection auto
              ANCHINGO Level 1

              i know there is no exact script, but I hope there is a way to do most of the work. About 70~80%. How to remove the black part around window?

              • 4. Re: How to make selection auto
                JJMack Most Valuable Participant

                ANCHINGO  wrote

                 

                How to remove the black part around window?

                Indeed how would you autoselect the black around the window and not select the black between and in the windows? Ask Watson its AI may be better than my intelligence.  AI the way to go.

                • 5. Re: How to make selection auto
                  geppettol66959005 Level 2

                  You could use color range

                  9aa9d05b65f456d06c257b272f3b5fd67fab13e3_large.jpg

                   

                  try this and see if it's OK for your case

                  // Input 0
                  cTID = function(c) {
                    return app.charIDToTypeID(c);
                  };
                  sTID = function(c) {
                    return app.stringIDToTypeID(c);
                  };
                  function zm10() {
                    (function(c, d) {
                      if (void 0 == c || c) {
                        var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;
                        a.putClass(PSClass.AdjustmentLayer);
                        b.putReference(PSString.Null, a);
                        a = new ActionDescriptor;
                        var f = new ActionDescriptor;
                        f.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
                        f.putInteger(PSKey.Red, 40);
                        f.putInteger(PSEnum.Yellow, 60);
                        f.putInteger(PSKey.Green, 40);
                        f.putInteger(PSKey.Cyan, 60);
                        f.putInteger(PSKey.Blue, 20);
                        f.putInteger(PSKey.Magenta, 80);
                        f.putBoolean(PSString.useTint, !1);
                        var h = new ActionDescriptor;
                        h.putDouble(PSKey.Red, 225.000457763672);
                        h.putDouble(PSKey.Green, 211.000671386719);
                        h.putDouble(PSKey.Blue, 179.001159667969);
                        f.putObject(PSString.tintColor, PSClass.RGBColor, h);
                        a.putObject(PSKey.Type, PSEnum.BlackAndWhite, f);
                        b.putObject(PSKey.Using, PSClass.AdjustmentLayer, a);
                        executeAction(sTID("make"), b, e);
                      }
                    })();
                    (function(c, d) {
                      if (void 0 == c || c) {
                        var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;
                        a.putClass(PSClass.AdjustmentLayer);
                        b.putReference(PSString.Null, a);
                        a = new ActionDescriptor;
                        var f = new ActionDescriptor;
                        f.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
                        a.putObject(PSKey.Type, PSClass.Curves, f);
                        b.putObject(PSKey.Using, PSClass.AdjustmentLayer, a);
                        executeAction(sTID("make"), b, e);
                      }
                    })();
                    (function(c, d) {
                      if (void 0 == c || c) {
                        var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;
                        a.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                        b.putReference(PSString.Null, a);
                        a = new ActionDescriptor;
                        a.putString(PSKey.Name, "TMP");
                        b.putObject(PSKey.To, PSClass.Layer, a);
                        executeAction(sTID("set"), b, e);
                      }
                    })();
                    (function(c, d) {
                      if (void 0 == c || c) {
                        var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;
                        a.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);
                        b.putReference(PSString.Null, a);
                        a = new ActionDescriptor;
                        a.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);
                        var f = new ActionList, h = new ActionDescriptor, k = new ActionReference;
                        k.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);
                        h.putReference(PSClass.Channel, k);
                        k = new ActionList;
                        var g = new ActionDescriptor;
                        g.putDouble(PSKey.Horizontal, 200);
                        g.putDouble(PSKey.Vertical, 0);
                        k.putObject(PSClass.Point, g);
                        g = new ActionDescriptor;
                        g.putDouble(PSKey.Horizontal, 250);
                        g.putDouble(PSKey.Vertical, 255);
                        k.putObject(PSClass.Point, g);
                        g = new ActionDescriptor;
                        g.putDouble(PSKey.Horizontal, 255);
                        g.putDouble(PSKey.Vertical, 251);
                        k.putObject(PSClass.Point, g);
                        h.putList(PSKey.Curve, k);
                        f.putObject(PSClass.CurvesAdjustment, h);
                        a.putList(PSKey.Adjustment, f);
                        b.putObject(PSKey.To, PSClass.Curves, a);
                        executeAction(sTID("set"), b, e);
                      }
                    })();
                    (function(c, d) {
                      if (void 0 == c || c) {
                        var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;
                        a.putProperty(PSClass.Channel, PSString.selection);
                        b.putReference(PSString.Null, a);
                        a = new ActionReference;
                        a.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
                        b.putReference(PSKey.To, a);
                        executeAction(sTID("set"), b, e);
                      }
                    })();
                    (function(c, d) {
                      if (void 0 == c || c) {
                        var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;
                        a.putClass(PSClass.AdjustmentLayer);
                        b.putReference(PSString.Null, a);
                        a = new ActionDescriptor;
                        var f = new ActionDescriptor;
                        f.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);
                        a.putObject(PSKey.Type, PSClass.Curves, f);
                        b.putObject(PSKey.Using, PSClass.AdjustmentLayer, a);
                        executeAction(sTID("make"), b, e);
                      }
                    })();
                    (function(c, d) {
                      if (void 0 == c || c) {
                        var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;
                        a.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
                        b.putReference(PSString.Null, a);
                        b.putBoolean(PSKey.MakeVisible, !1);
                        executeAction(sTID("select"), b, e);
                      }
                    })();
                    (function(c, d) {
                      if (void 0 == c || c) {
                        var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;
                        a.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                        b.putReference(PSString.Null, a);
                        a = new ActionDescriptor;
                        a.putString(PSKey.Name, "Zone 10");
                        b.putObject(PSKey.To, PSClass.Layer, a);
                        executeAction(sTID("set"), b, e);
                      }
                    })();
                    (function(c, d) {
                      if (void 0 == c || c) {
                        var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;
                        a.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);
                        b.putReference(PSString.Null, a);
                        b.putBoolean(PSKey.MakeVisible, !1);
                        a = new ActionList;
                        a.putInteger(246);
                        b.putList(PSKey.LayerID, a);
                        executeAction(sTID("select"), b, e);
                      }
                    })();
                    (function(c, d) {
                      if (void 0 == c || c) {
                        var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;
                        a.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                        b.putReference(PSString.Null, a);
                        a = new ActionDescriptor;
                        b.putObject(PSKey.To, PSClass.Layer, a);
                        executeAction(sTID("set"), b, e);
                      }
                    })();
                    (function(c, d) {
                      if (void 0 == c || c) {
                        var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;
                        a.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);
                        b.putReference(PSString.Null, a);
                        b.putBoolean(PSKey.MakeVisible, !1);
                        executeAction(sTID("select"), b, e);
                      }
                    })();
                    (function(c, d) {
                      if (void 0 == c || c) {
                        var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;
                        a.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                        b.putReference(PSString.Null, a);
                        a = new ActionList;
                        a.putInteger(246);
                        b.putList(PSKey.LayerID, a);
                        executeAction(sTID("delete"), b, e);
                      }
                    })();
                    (function(c, d) {
                      if (void 0 == c || c) {
                        var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;
                        a.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);
                        b.putReference(PSString.Null, a);
                        a = new ActionList;
                        a.putInteger(245);
                        b.putList(PSKey.LayerID, a);
                        executeAction(sTID("delete"), b, e);
                      }
                    })();
                    (function(c, d) {
                      if (void 0 == c || c) {
                        var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;
                        a.putName(PSClass.Layer, "Zone 10");
                        b.putReference(PSString.Null, a);
                        b.putBoolean(PSKey.MakeVisible, !1);
                        executeAction(sTID("select"), b, e);
                      }
                    })();
                  }
                  zm10.loadSymbols = function() {
                    var c = $.level;
                    $.level = 0;
                    try {
                      PSConstants;
                      return;
                    } catch (e) {
                    } finally {
                      $.level = c;
                    }
                    var d = !0;
                    $.level = 0;
                    try {
                      PSClass, d = !1;
                    } catch (e) {
                    } finally {
                      $.level = c;
                    }
                    d && (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.Curves = cTID("Crvs");
                    PSClass.CurvesAdjustment = cTID("CrvA");
                    PSClass.Layer = cTID("Lyr ");
                    PSClass.Point = cTID("Pnt ");
                    PSClass.RGBColor = cTID("RGBC");
                    PSEnum.Backward = cTID("Bckw");
                    PSEnum.BlackAndWhite = cTID("BanW");
                    PSEnum.Composite = cTID("Cmps");
                    PSEnum.RGB = cTID("RGB ");
                    PSEnum.Target = cTID("Trgt");
                    PSEnum.Yellow = cTID("Yllw");
                    PSKey.Adjustment = cTID("Adjs");
                    PSKey.Blue = cTID("Bl  ");
                    PSKey.Curve = cTID("Crv ");
                    PSKey.Cyan = cTID("Cyn ");
                    PSKey.Green = cTID("Grn ");
                    PSKey.Horizontal = cTID("Hrzn");
                    PSKey.LayerID = cTID("LyrI");
                    PSKey.Magenta = cTID("Mgnt");
                    PSKey.MakeVisible = cTID("MkVs");
                    PSKey.Name = cTID("Nm  ");
                    PSKey.Red = cTID("Rd  ");
                    PSKey.To = cTID("T   ");
                    PSKey.Type = cTID("Type");
                    PSKey.Using = cTID("Usng");
                    PSKey.Vertical = cTID("Vrtc");
                    PSString.Null = sTID("null");
                    PSString.presetKind = sTID("presetKind");
                    PSString.presetKindCustom = sTID("presetKindCustom");
                    PSString.presetKindDefault = sTID("presetKindDefault");
                    PSString.presetKindType = sTID("presetKindType");
                    PSString.selection = sTID("selection");
                    PSString.tintColor = sTID("tintColor");
                    PSString.useTint = sTID("useTint");
                    PSType.Ordinal = cTID("Ordn");
                  };
                  zm10.loadSymbols();
                  zm10.main = function() {
                    zm10();
                  };
                  zm10.main();
                  var idmove = charIDToTypeID("move"), desc208 = new ActionDescriptor, idnull = charIDToTypeID("null"), 
                  ref198 = new ActionReference, idLyr = charIDToTypeID("Lyr "), 
                  idOrdn = charIDToTypeID("Ordn"), idTrgt = charIDToTypeID("Trgt");
                  ref198.putEnumerated(idLyr, idOrdn, idTrgt);
                  desc208.putReference(idnull, ref198);
                  var idT = charIDToTypeID("T   "), ref199 = new ActionReference;
                  idLyr = charIDToTypeID("Lyr ");
                  idOrdn = charIDToTypeID("Ordn");
                  var idFrnt = charIDToTypeID("Frnt");
                  ref199.putEnumerated(idLyr, idOrdn, idFrnt);
                  desc208.putReference(idT, ref199);
                  executeAction(idmove, desc208, DialogModes.NO);
                  
                  • 6. Re: How to make selection auto
                    ANCHINGO Level 1

                    Thank you!,

                    I tried it but it was not as expected.

                    • 7. Re: How to make selection auto
                      geppettol66959005 Level 2

                      in what sense do you create a window mask?

                      • 8. Re: How to make selection auto
                        ANCHINGO Level 1

                        i want auto make selection area window.

                        • 9. Re: How to make selection auto
                          geppettol66959005 Level 2

                          this is

                           

                          // Input 0  
                          cTID = function(c) {  
                            return app.charIDToTypeID(c);  
                          };  
                          sTID = function(c) {  
                            return app.stringIDToTypeID(c);  
                          };  
                          function zm10() {  
                            (function(c, d) {  
                              if (void 0 == c || c) {  
                                var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;  
                                a.putClass(PSClass.AdjustmentLayer);  
                                b.putReference(PSString.Null, a);  
                                a = new ActionDescriptor;  
                                var f = new ActionDescriptor;  
                                f.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);  
                                f.putInteger(PSKey.Red, 40);  
                                f.putInteger(PSEnum.Yellow, 60);  
                                f.putInteger(PSKey.Green, 40);  
                                f.putInteger(PSKey.Cyan, 60);  
                                f.putInteger(PSKey.Blue, 20);  
                                f.putInteger(PSKey.Magenta, 80);  
                                f.putBoolean(PSString.useTint, !1);  
                                var h = new ActionDescriptor;  
                                h.putDouble(PSKey.Red, 225.000457763672);  
                                h.putDouble(PSKey.Green, 211.000671386719);  
                                h.putDouble(PSKey.Blue, 179.001159667969);  
                                f.putObject(PSString.tintColor, PSClass.RGBColor, h);  
                                a.putObject(PSKey.Type, PSEnum.BlackAndWhite, f);  
                                b.putObject(PSKey.Using, PSClass.AdjustmentLayer, a);  
                                executeAction(sTID("make"), b, e);  
                              }  
                            })();  
                            (function(c, d) {  
                              if (void 0 == c || c) {  
                                var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;  
                                a.putClass(PSClass.AdjustmentLayer);  
                                b.putReference(PSString.Null, a);  
                                a = new ActionDescriptor;  
                                var f = new ActionDescriptor;  
                                f.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);  
                                a.putObject(PSKey.Type, PSClass.Curves, f);  
                                b.putObject(PSKey.Using, PSClass.AdjustmentLayer, a);  
                                executeAction(sTID("make"), b, e);  
                              }  
                            })();  
                            (function(c, d) {  
                              if (void 0 == c || c) {  
                                var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;  
                                a.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);  
                                b.putReference(PSString.Null, a);  
                                a = new ActionDescriptor;  
                                a.putString(PSKey.Name, "TMP");  
                                b.putObject(PSKey.To, PSClass.Layer, a);  
                                executeAction(sTID("set"), b, e);  
                              }  
                            })();  
                            (function(c, d) {  
                              if (void 0 == c || c) {  
                                var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;  
                                a.putEnumerated(PSClass.AdjustmentLayer, PSType.Ordinal, PSEnum.Target);  
                                b.putReference(PSString.Null, a);  
                                a = new ActionDescriptor;  
                                a.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindCustom);  
                                var f = new ActionList, h = new ActionDescriptor, k = new ActionReference;  
                                k.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.Composite);  
                                h.putReference(PSClass.Channel, k);  
                                k = new ActionList;  
                                var g = new ActionDescriptor;  
                                g.putDouble(PSKey.Horizontal, 200);  
                                g.putDouble(PSKey.Vertical, 0);  
                                k.putObject(PSClass.Point, g);  
                                g = new ActionDescriptor;  
                                g.putDouble(PSKey.Horizontal, 250);  
                                g.putDouble(PSKey.Vertical, 255);  
                                k.putObject(PSClass.Point, g);  
                                g = new ActionDescriptor;  
                                g.putDouble(PSKey.Horizontal, 255);  
                                g.putDouble(PSKey.Vertical, 251);  
                                k.putObject(PSClass.Point, g);  
                                h.putList(PSKey.Curve, k);  
                                f.putObject(PSClass.CurvesAdjustment, h);  
                                a.putList(PSKey.Adjustment, f);  
                                b.putObject(PSKey.To, PSClass.Curves, a);  
                                executeAction(sTID("set"), b, e);  
                              }  
                            })();  
                            (function(c, d) {  
                              if (void 0 == c || c) {  
                                var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;  
                                a.putProperty(PSClass.Channel, PSString.selection);  
                                b.putReference(PSString.Null, a);  
                                a = new ActionReference;  
                                a.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);  
                                b.putReference(PSKey.To, a);  
                                executeAction(sTID("set"), b, e);  
                              }  
                            })();  
                            (function(c, d) {  
                              if (void 0 == c || c) {  
                                var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;  
                                a.putClass(PSClass.AdjustmentLayer);  
                                b.putReference(PSString.Null, a);  
                                a = new ActionDescriptor;  
                                var f = new ActionDescriptor;  
                                f.putEnumerated(PSString.presetKind, PSString.presetKindType, PSString.presetKindDefault);  
                                a.putObject(PSKey.Type, PSClass.Curves, f);  
                                b.putObject(PSKey.Using, PSClass.AdjustmentLayer, a);  
                                executeAction(sTID("make"), b, e);  
                              }  
                            })();  
                            (function(c, d) {  
                              if (void 0 == c || c) {  
                                var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;  
                                a.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);  
                                b.putReference(PSString.Null, a);  
                                b.putBoolean(PSKey.MakeVisible, !1);  
                                executeAction(sTID("select"), b, e);  
                              }  
                            })();  
                            (function(c, d) {  
                              if (void 0 == c || c) {  
                                var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;  
                                a.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);  
                                b.putReference(PSString.Null, a);  
                                a = new ActionDescriptor;  
                                a.putString(PSKey.Name, "Zone 10");  
                                b.putObject(PSKey.To, PSClass.Layer, a);  
                                executeAction(sTID("set"), b, e);  
                              }  
                            })();  
                            (function(c, d) {  
                              if (void 0 == c || c) {  
                                var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;  
                                a.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Backward);  
                                b.putReference(PSString.Null, a);  
                                b.putBoolean(PSKey.MakeVisible, !1);  
                                a = new ActionList;  
                                a.putInteger(246);  
                                b.putList(PSKey.LayerID, a);  
                                executeAction(sTID("select"), b, e);  
                              }  
                            })();  
                            (function(c, d) {  
                              if (void 0 == c || c) {  
                                var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;  
                                a.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);  
                                b.putReference(PSString.Null, a);  
                                a = new ActionDescriptor;  
                                b.putObject(PSKey.To, PSClass.Layer, a);  
                                executeAction(sTID("set"), b, e);  
                              }  
                            })();  
                            (function(c, d) {  
                              if (void 0 == c || c) {  
                                var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;  
                                a.putEnumerated(PSClass.Channel, PSClass.Channel, PSEnum.RGB);  
                                b.putReference(PSString.Null, a);  
                                b.putBoolean(PSKey.MakeVisible, !1);  
                                executeAction(sTID("select"), b, e);  
                              }  
                            })();  
                            (function(c, d) {  
                              if (void 0 == c || c) {  
                                var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;  
                                a.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);  
                                b.putReference(PSString.Null, a);  
                                a = new ActionList;  
                                a.putInteger(246);  
                                b.putList(PSKey.LayerID, a);  
                                executeAction(sTID("delete"), b, e);  
                              }  
                            })();  
                            (function(c, d) {  
                              if (void 0 == c || c) {  
                                var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;  
                                a.putEnumerated(PSClass.Layer, PSType.Ordinal, PSEnum.Target);  
                                b.putReference(PSString.Null, a);  
                                a = new ActionList;  
                                a.putInteger(245);  
                                b.putList(PSKey.LayerID, a);  
                                executeAction(sTID("delete"), b, e);  
                              }  
                            })();  
                            (function(c, d) {  
                              if (void 0 == c || c) {  
                                var e = d ? DialogModes.ALL : DialogModes.NO, b = new ActionDescriptor, a = new ActionReference;  
                                a.putName(PSClass.Layer, "Zone 10");  
                                b.putReference(PSString.Null, a);  
                                b.putBoolean(PSKey.MakeVisible, !1);  
                                executeAction(sTID("select"), b, e);  
                              }  
                            })();  
                          }  
                          zm10.loadSymbols = function() {  
                            var c = $.level;  
                            $.level = 0;  
                            try {  
                              PSConstants;  
                              return;  
                            } catch (e) {  
                            } finally {  
                              $.level = c;  
                            }  
                            var d = !0;  
                            $.level = 0;  
                            try {  
                              PSClass, d = !1;  
                            } catch (e) {  
                            } finally {  
                              $.level = c;  
                            }  
                            d && (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.Curves = cTID("Crvs");  
                            PSClass.CurvesAdjustment = cTID("CrvA");  
                            PSClass.Layer = cTID("Lyr ");  
                            PSClass.Point = cTID("Pnt ");  
                            PSClass.RGBColor = cTID("RGBC");  
                            PSEnum.Backward = cTID("Bckw");  
                            PSEnum.BlackAndWhite = cTID("BanW");  
                            PSEnum.Composite = cTID("Cmps");  
                            PSEnum.RGB = cTID("RGB ");  
                            PSEnum.Target = cTID("Trgt");  
                            PSEnum.Yellow = cTID("Yllw");  
                            PSKey.Adjustment = cTID("Adjs");  
                            PSKey.Blue = cTID("Bl  ");  
                            PSKey.Curve = cTID("Crv ");  
                            PSKey.Cyan = cTID("Cyn ");  
                            PSKey.Green = cTID("Grn ");  
                            PSKey.Horizontal = cTID("Hrzn");  
                            PSKey.LayerID = cTID("LyrI");  
                            PSKey.Magenta = cTID("Mgnt");  
                            PSKey.MakeVisible = cTID("MkVs");  
                            PSKey.Name = cTID("Nm  ");  
                            PSKey.Red = cTID("Rd  ");  
                            PSKey.To = cTID("T   ");  
                            PSKey.Type = cTID("Type");  
                            PSKey.Using = cTID("Usng");  
                            PSKey.Vertical = cTID("Vrtc");  
                            PSString.Null = sTID("null");  
                            PSString.presetKind = sTID("presetKind");  
                            PSString.presetKindCustom = sTID("presetKindCustom");  
                            PSString.presetKindDefault = sTID("presetKindDefault");  
                            PSString.presetKindType = sTID("presetKindType");  
                            PSString.selection = sTID("selection");  
                            PSString.tintColor = sTID("tintColor");  
                            PSString.useTint = sTID("useTint");  
                            PSType.Ordinal = cTID("Ordn");  
                          };  
                          zm10.loadSymbols();  
                          zm10.main = function() {  
                            zm10();  
                          };  
                          zm10.main();  
                          var idmove = charIDToTypeID("move"), desc208 = new ActionDescriptor, idnull = charIDToTypeID("null"),   
                          ref198 = new ActionReference, idLyr = charIDToTypeID("Lyr "),   
                          idOrdn = charIDToTypeID("Ordn"), idTrgt = charIDToTypeID("Trgt");  
                          ref198.putEnumerated(idLyr, idOrdn, idTrgt);  
                          desc208.putReference(idnull, ref198);  
                          var idT = charIDToTypeID("T   "), ref199 = new ActionReference;  
                          idLyr = charIDToTypeID("Lyr ");  
                          idOrdn = charIDToTypeID("Ordn");  
                          var idFrnt = charIDToTypeID("Frnt");  
                          ref199.putEnumerated(idLyr, idOrdn, idFrnt);  
                          desc208.putReference(idT, ref199);  
                          executeAction(idmove, desc208, DialogModes.NO);  
                          
                          
                          // =======================================================
                          var desc1 = new ActionDescriptor();
                          var ref1 = new ActionReference();
                          ref1.putProperty( charIDToTypeID( "Chnl" ), charIDToTypeID( "fsel" ) );
                          desc1.putReference( charIDToTypeID( "null" ), ref1 );
                          var ref2 = new ActionReference();
                          ref2.putEnumerated( charIDToTypeID( "Chnl" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );
                          desc1.putReference( charIDToTypeID( "T   " ), ref2 );
                          executeAction( charIDToTypeID( "setd" ), desc1, DialogModes.NO );
                          // =======================================================
                          var desc2 = new ActionDescriptor();
                          var ref3 = new ActionReference();
                          ref3.putEnumerated( charIDToTypeID( "Lyr " ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );
                          desc2.putReference( charIDToTypeID( "null" ), ref3 );
                          var list1 = new ActionList();
                          list1.putInteger( 7 );
                          desc2.putList( charIDToTypeID( "LyrI" ), list1 );
                          executeAction( charIDToTypeID( "Dlt " ), desc2, DialogModes.NO );
                          
                          • 10. Re: How to make selection auto
                            ANCHINGO Level 1

                            I tried, but trees, the house is also fill black. I want to choose all the trees, house,.. of outside.

                            • 11. Re: How to make selection auto
                              geppettol66959005 Level 2

                              I'm sorry but what you're looking for is not possible.

                              • 12. Re: How to make selection auto
                                ANCHINGO Level 1

                                Yep, thank you so much!