1 Reply Latest reply on Mar 11, 2015 10:08 AM by alicank20895150

    How to make the script select "Healing Brush Tool"?

    alicank20895150

      I normally use the below code to select the other tools, I use their StringIDs and they work just well as far

       

      $._ext_patch={

        run : function Patch() {

        function selectTool(stringID){

        var d = new ActionDescriptor();

        var r = new ActionReference();

        r.putClass( s2t(stringID) );

        d.putReference( s2t("target"), r);

        d.putBoolean( s2t("dontRecord"), true );

        d.putBoolean( s2t("forceNotify"), true );

        executeAction( s2t("select"), d, DialogModes.NO );

        };

       

       

      // Returns the StringID of the selected Tool

        function getCurrentTool() {

        var r = new ActionReference();

        r.putProperty( s2t("property"), s2t("tool") );

        r.putEnumerated( s2t("application"), s2t("ordinal"), s2t("targetEnum") );

        var d = executeActionGet(r);

        return t2s( d.getEnumerationType( s2t("tool") ) );

        };

        selectTool("patchSelection");

        getCurrentTool();

        },

      };


      I want to be able to use the healing brush tool but nowhere could I find it's string id or tool id, I tried "healingbrushTool" like "paintbrushTool" thinking maybe they are similar, but it also didn't work, how can I achieve this?

      Thanks in advance for your help.