Ps Actions does not record certain tool selections

Explorer ,
May 08, 2021 May 08, 2021

Copy link to clipboard

Copied

I frequently use an action to add a new layer with a Gradient Tool adjustment on it. When I create this as an action, the tool selection is not recorded so I must always select the Gradient Tool and my Gradient preset after running this action. If I add a Tool selection step and then add a Tool Preset selection to my action, then in cases where another tool was previously used (say brush tool) the action stops running with the error that selection is not available. I think that this refers to that it cannot select my particular Gradient tool preset when the gradient tool is not first selected. I have enabled "Allow Tool Recording" in the Actions menu...

Ps version is 22.3.1

Gradient tool selection is not covered by Ps in an action. Am I the only person using gradients to quickly correct uneven lighting etc? 

Comments from Ps users or Adobe would be very helpful. Thanks.

TOPICS
Actions and scripting

Views

3.2K

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 4 Correct Answers

Adobe Community Professional , May 08, 2021 May 08, 2021
If you have the tool preset loaded then the action can open the recorded preset first, which will also select the gradient tool (I forgot to mention that current tool only has to be unchecked in tool presets, thanks Kukurykus). Actions are more accessible but limited in functionality compared to scripts. A script can select a tool, which can be recorded into an action.

Likes

Translate

Translate
Adobe Community Professional , May 08, 2021 May 08, 2021

Likes

Translate

Translate
LEGEND , May 08, 2021 May 08, 2021
Not everything you do in Photoshop records. As you found out Selecting some tool selections do not record and you also found out you can only select Tool Preset for the current tool unless you have show all tool presets in Photoshop UI.  You will also find that recording tools usage  is not very useful unless all documents the action will be used  on have Canvas size so the tool strokes  will be the same in each document. So if all you actually want to do is to select the tool you want to use ...

Likes

Translate

Translate
Adobe Community Professional , May 08, 2021 May 08, 2021
Copy the command you need from this Action https://disk.yandex.ru/d/IFn5lyAW9Z5Biw

Likes

Translate

Translate
Adobe Community Professional ,
May 08, 2021 May 08, 2021

Copy link to clipboard

Copied

If you have the tool preset loaded then the action can open the recorded preset first, which will also select the gradient tool (I forgot to mention that current tool only has to be unchecked in tool presets, thanks Kukurykus).

 

Actions are more accessible but limited in functionality compared to scripts. A script can select a tool, which can be recorded into an action.

 

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
Adobe Community Professional ,
May 08, 2021 May 08, 2021

Copy link to clipboard

Copied

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 ,
May 08, 2021 May 08, 2021

Copy link to clipboard

Copied

Not everything you do in Photoshop records. As you found out Selecting some tool selections do not record and you also found out you can only select Tool Preset for the current tool unless you have show all tool presets in Photoshop UI.  You will also find that recording tools usage  is not very useful unless all documents the action will be used  on have Canvas size so the tool strokes  will be the same in each document.

 

So if all you actually want to do is to select the tool you want to use when the action finishes.  You can do that in the action by using a little Photoshop to select tool menu File>Scripts>SelectToolName.

 

 

selectTool("magicLassoTool");
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 Photoshop tool names here you will not see the Frame tool here I even removed it from my Tool Bar so don't look here
'moveTool'                     'cloneStampTool'            'typeCreateOrEditTool'            'artboardTool'
'marqueeRectTool'              'patternStampTool'          'typeVerticalCreateOrEditTool'    'perspectiveCropTool'
'marqueeEllipTool'             'historyBrushTool'          'typeCreateMaskTool'              'eyedropperTool'              
'marqueeSingleRowTool'         'artBrushTool'              'typeVerticalCreateMaskTool'      '3DMaterialSelectTool'
'marqueeSingleColumnTool'      'eraserTool'                'pathComponentSelectTool'         "magicLassoTool" 
'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
Adobe Community Professional ,
May 08, 2021 May 08, 2021

Copy link to clipboard

Copied

Copy the command you need from this Action https://disk.yandex.ru/d/IFn5lyAW9Z5Biw

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
Enthusiast ,
May 08, 2021 May 08, 2021

Copy link to clipboard

Copied

@r-bin, have you edited the atn file? great idea! 

 

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
Adobe Community Professional ,
May 08, 2021 May 08, 2021

Copy link to clipboard

Copied

This is it. 🙂
I change the "E" in the word "ErTl" to "G".
 

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
Adobe Community Professional ,
May 08, 2021 May 08, 2021

Copy link to clipboard

Copied

I'd like to double check my understanding here...

 

(1) Some commands can't be recorded via an action, such as directly selecting a tool (a tool can be indirectly selected by recording the use of a tool preset with the current tool only checkbox unchecked).

 

(2) A script can directly select a tool.

 

(3) By using one of xbytor's xtools conversion scripts (or perhaps a different script), one can convert a script into an action (2) to achieve something that is not possible as a native option (1).

 

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
Adobe Community Professional ,
May 08, 2021 May 08, 2021

Copy link to clipboard

Copied

But it is better to make a script for a specific executeAction and then convert it into an Action command. Somewhere here on the forum there was a script for converting scripts into Actions. Then you can use Actions almost like scripts.

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
Adobe Community Professional ,
May 08, 2021 May 08, 2021

Copy link to clipboard

Copied

Does this only work with charID's, such as:

 

charID = 'GrTl'
(charIDToTypeID ('GrTl'))

 

Or does it also work with stringID's, such as:

 

stringID = gradientTool
(stringIDToTypeID ('gradientTool'))

 

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
Adobe Community Professional ,
May 08, 2021 May 08, 2021

Copy link to clipboard

Copied

and also match this with what the ActionDescriptor.toStream() function gives.

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
Adobe Community Professional ,
May 09, 2021 May 09, 2021

Copy link to clipboard

Copied

JulianMuscott

It seems that in order to draw a gradient on a layer, you do not need to write the selection of this tool and its preset into the action. Everything is recorded in one gradient command and does not require then selecting the gradient tool anf preset during playback.

 

I think so, check it out for yourself.

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
Adobe Community Professional ,
May 10, 2021 May 10, 2021

Copy link to clipboard

Copied

LATEST

r-bin To adjust lighting I'm guessing that the OP wants the tool and preset to be ready to apply in a manual step. Recording the action of the gradient and preset probably does not suffice, even an undo does not leave the tool active.

 

P.S. Thank you for the hints on creating an action from a script to select a tool. Sadly this is beyond me at the moment. It is great that this is possible to do when an action can't do this by itself. Would be nice if this was more accessible.

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