Skip to main content
Participant
March 26, 2017
Answered

Photoshop Actions will not record all tool selections. WHY ?

  • March 26, 2017
  • 1 reply
  • 2609 views

I have written an action with a stop to allow an Eliptical Marquee to be drawn, to suit that particular photograph being processed.

It works fine as long as the correct tool is selected before running the action.

The Action should be able to re-set the required tool itself if another tool is active but it does not !

When recording an action, for example " The Clone Stamp " can be selected and it duly records in the action. The same is not the case for all tools esp. the one I want.

I have tried both clicking the tool and using the "M" shortcut key but neither work.

Sure I can put a message in the STOP text box to tell the user to change it but I feel this is a cop out. The thing should work the same as other tool selection record.

Any help/Advice appreciated.

Dave

    This topic has been closed for replies.
    Correct answer c.pfaffenbichler

    Worst case you could use a little Script (paste the text into a text-file and save it with the extension jsx into the Presets/Scripts-Folder) and record it into the Action.

    // =======================================================

    var idslct = charIDToTypeID( "slct" );

        var desc23 = new ActionDescriptor();

        var idnull = charIDToTypeID( "null" );

            var ref3 = new ActionReference();

            var idmarqueeEllipTool = stringIDToTypeID( "marqueeEllipTool" );

            ref3.putClass( idmarqueeEllipTool );

        desc23.putReference( idnull, ref3 );

        var iddontRecord = stringIDToTypeID( "dontRecord" );

        desc23.putBoolean( iddontRecord, true );

        var idforceNotify = stringIDToTypeID( "forceNotify" );

        desc23.putBoolean( idforceNotify, true );

    executeAction( idslct, desc23, DialogModes.NO );

    1 reply

    c.pfaffenbichler
    Community Expert
    c.pfaffenbichlerCommunity ExpertCorrect answer
    Community Expert
    March 26, 2017

    Worst case you could use a little Script (paste the text into a text-file and save it with the extension jsx into the Presets/Scripts-Folder) and record it into the Action.

    // =======================================================

    var idslct = charIDToTypeID( "slct" );

        var desc23 = new ActionDescriptor();

        var idnull = charIDToTypeID( "null" );

            var ref3 = new ActionReference();

            var idmarqueeEllipTool = stringIDToTypeID( "marqueeEllipTool" );

            ref3.putClass( idmarqueeEllipTool );

        desc23.putReference( idnull, ref3 );

        var iddontRecord = stringIDToTypeID( "dontRecord" );

        desc23.putBoolean( iddontRecord, true );

        var idforceNotify = stringIDToTypeID( "forceNotify" );

        desc23.putBoolean( idforceNotify, true );

    executeAction( idslct, desc23, DialogModes.NO );

    Participant
    December 7, 2022

    Sweet.  Thank you C.Pfaffenbichler and JJMack

     

    Stephen Marsh
    Community Expert
    Community Expert
    December 8, 2022

    When v2021 was released, I created an updated tool list. Just remove the comment //in front of the required tool. Please let me know if there are any errors or omissions...

     

    //selectTool('moveTool');
    //selectTool('artboardTool’);
    //selectTool('marqueeRectTool');
    //selectTool('marqueeEllipTool');
    //selectTool('marqueeSingleRowTool');
    //selectTool('marqueeSingleColumnTool');
    //selectTool('lassoTool');
    //selectTool('polySelTool');
    //selectTool('magneticLassoTool');
    //selectTool('magicLassoTool’);
    //selectTool('quickSelectTool');
    //selectTool('magicWandTool');
    //selectTool('cropTool');
    //selectTool('perspectiveCropTool’);
    //selectTool('sliceTool');
    //selectTool('sliceSelectTool');
    //selectTool('framedGroupTool’);
    //selectTool('eyedropperTool');
    //selectTool('3DMaterialSelectTool’);
    //selectTool('colorSamplerTool');
    //selectTool('rulerTool');
    //selectTool('textAnnotTool');
    //selectTool('countTool’);
    //selectTool('spotHealingBrushTool');
    //selectTool('magicStampTool');
    //selectTool('patchSelection');
    //selectTool('recomposeSelection’);
    //selectTool('redEyeTool');
    //selectTool('paintbrushTool');
    //selectTool('pencilTool');
    //selectTool('colorReplacementBrushTool');
    //selectTool('wetBrushTool’);
    //selectTool('cloneStampTool');
    //selectTool('patternStampTool');
    //selectTool('historyBrushTool');
    //selectTool('artBrushTool');
    //selectTool('eraserTool');
    //selectTool('backgroundEraserTool');
    //selectTool('magicEraserTool');
    //selectTool('gradientTool');
    //selectTool('bucketTool');
    //selectTool('3DMaterialDropTool’);
    //selectTool('blurTool');
    //selectTool('sharpenTool');
    //selectTool('smudgeTool');
    //selectTool('dodgeTool');
    //selectTool('burnInTool');
    //selectTool('saturationTool');
    //selectTool('penTool');
    //selectTool('freeformPenTool');
    //selectTool('curvaturePenTool’);
    //selectTool('addKnotTool');
    //selectTool('deleteKnotTool');
    //selectTool('convertKnotTool');
    //selectTool('typeCreateOrEditTool');
    //selectTool('typeVerticalCreateOrEditTool');
    //selectTool('typeCreateMaskTool');
    //selectTool('typeVerticalCreateMaskTool');
    //selectTool('pathComponentSelectTool');
    //selectTool('directSelectTool');
    //selectTool('rectangleTool');
    //selectTool('roundedRectangleTool');
    //selectTool('ellipseTool');
    //selectTool('triangleTool’);
    //selectTool('polygonTool');
    //selectTool('lineTool');
    //selectTool('customShapeTool');
    //selectTool('handTool');
    //selectTool('rotateTool’);
    //selectTool('zoomTool’);
    
    function selectTool(tool) {
        var desc9 = new ActionDescriptor();
            var ref7 = new ActionReference();
            ref7.putClass( app.stringIDToTypeID(tool) );
        desc9.putReference( app.charIDToTypeID('null'), ref7 );
        executeAction( app.charIDToTypeID('slct'), desc9, DialogModes.NO );
    };

     

    P.S. Actions can only select a tool by selecting a tool preset, not by directly selecting the tool... That being said, @r-bin has shown that it is possible to hack an action to do so!


    I have added this to the "Action Helper Scripts" collection.

     

    https://community.adobe.com/t5/photoshop-ecosystem-discussions/photoshop-action-helper-scripts/td-p/13375126