• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

Photoshop Actions will not record all tool selections. WHY ?

New Here ,
Mar 26, 2017 Mar 26, 2017

Copy link to clipboard

Copied

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

Views

1.6K

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 26, 2017 Mar 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( idmarqueeElli

...

Likes

Translate

Translate
Community Expert ,
Mar 26, 2017 Mar 26, 2017

Copy link to clipboard

Copied

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 );

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 26, 2017 Mar 26, 2017

Copy link to clipboard

Copied

I am in your debt Sir thank you.

I was hoping for a more in app solution but this will be a way out in need.

Thank you so much for your time and trouble.

Dave

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 26, 2017 Mar 26, 2017

Copy link to clipboard

Copied

Unfortunately you have to include the Script with the Action if you pass it along to others.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 27, 2017 Mar 27, 2017

Copy link to clipboard

Copied

And the script is different for each tool name.

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 );

};

/* Some of Photoshop  internal tool names

'moveTool'                                 'cloneStampTool'                'typeCreateOrEditTool'                 'artboardTool'

'marqueeRectTool'                    'patternStampTool'             'typeVerticalCreateOrEditTool'      'perspectiveCropTool'

'marqueeEllipTool'                     'historyBrushTool'               'typeCreateMaskTool'                   'eyedropperTool'            

'marqueeSingleRowTool'           'artBrushTool'                      'typeVerticalCreateMaskTool'      '3DMaterialSelectTool'

'marqueeSingleColumnTool'      'eraserTool'                         'pathComponentSelectTool'

'lassoTool'                                  'backgroundEraserTool'      'directSelectTool'

'polySelTool'                              'magicEraserTool'                'rectangleTool'

'magneticLassoTool'                  'gradientTool'                       'roundedRectangleTool'

'quickSelectTool'                        'bucketTool'                          'ellipseTool'

'magicWandTool'                        'blurTool'                              'polygonTool'

'cropTool'                                   'sharpenTool'                       'lineTool'

'sliceTool'                                   'smudgeTool'                       'customShapeTool'

'sliceSelectTool'                         'dodgeTool'                          'textAnnotTool'

'spotHealingBrushTool'              'burnInTool'                         'soundAnnotTool'

'magicStampTool'                      'saturationTool'                    'eyedropperTool'

'patchSelection'                         'penTool'                              'colorSamplerTool'

'redEyeTool'                               'freeformPenTool'                'rulerTool'

'paintbrushTool'                         'addKnotTool'                        'handTool'

'pencilTool'                                 'deleteKnotTool'                    'zoomTool'

'colorReplacementBrushTool'    'convertKnotTool'                 'wetBrushTool'

*/

JJMack

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 07, 2022 Dec 07, 2022

Copy link to clipboard

Copied

Sweet.  Thank you C.Pfaffenbichler and JJMack

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 07, 2022 Dec 07, 2022

Copy link to clipboard

Copied

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!

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 07, 2022 Dec 07, 2022

Copy link to clipboard

Copied

That's Dope!  Thanks for sharing.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 07, 2022 Dec 07, 2022

Copy link to clipboard

Copied

LATEST

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

 

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

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines