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

Append to Action a Tool selection

Explorer ,
Oct 15, 2020 Oct 15, 2020

Copy link to clipboard

Copied

How can I append to an existing action, a tool change to a specific tool, so that after the action completes, the selected tool is the one chosen in the action step

 

For Example: After performing the action, the current selected tool becomes the Text Tool.

Views

333

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 , Oct 15, 2020 Oct 15, 2020

Only selecting some tools record in an actions. To select other tools actions need to use a script. Selecting the text tool requires a script.

 

selectTool("typeCreateOrEditTool");
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 too
...

Votes

Translate

Translate
Adobe
Community Expert ,
Oct 15, 2020 Oct 15, 2020

Copy link to clipboard

Copied

Only selecting some tools record in an actions. To select other tools actions need to use a script. Selecting the text tool requires a script.

 

selectTool("typeCreateOrEditTool");
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

Votes

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
Explorer ,
Oct 15, 2020 Oct 15, 2020

Copy link to clipboard

Copied

Thanks. But how do I use the script in Actions ?

Votes

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
Explorer ,
Oct 15, 2020 Oct 15, 2020

Copy link to clipboard

Copied

Here is what I read about how to use scripting - https://helpx.adobe.com/photoshop/using/scripting.html

 

  1. Save it as a .js file to 'Photoshop CS5/Presets/Scripts folder'
  2. During Recording the action Use File > Scripts > Browse.. to run the Script

 

But I cannot find the Scripts folder in '~/Library/Application Support/Adobe/Presets/' .

Should I create one folder by name Scripts and save it there ?

Votes

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 ,
Oct 16, 2020 Oct 16, 2020

Copy link to clipboard

Copied

Do you have anything listed in File > Scripts > ?

 

If you do have then look again for Scripts folder.

 

If you have script in Scripts folder then you can run it from File > Scripts without browsing for it. If you use Browse to browse for script it should work fine too but be carefull to not move or accidentally delete that script which must be at location which is hard coded in action step.

Votes

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
Explorer ,
Oct 16, 2020 Oct 16, 2020

Copy link to clipboard

Copied

Thanks for the reply. 

 

File > Scripts has these items, but I dont see a Scripts folder at '~/Library/Application Support/Adobe/Presets/'.

 

I tried creating one, but still the custom script does not appear under the File > Scripts menu 

 

file.scripts.png

 

Votes

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 ,
Oct 16, 2020 Oct 16, 2020

Copy link to clipboard

Copied

"File > Scripts has these items, but I dont see a Scripts folder at '~/Library/Application Support/Adobe/Presets/"

 

I think you are looking in wrong folder. Try this instructions Applications > Photoshop CC > Presets > Scripts.

I am Windows user, you have Scripts folder but you are looking in wrong place.

Votes

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
Explorer ,
Oct 16, 2020 Oct 16, 2020

Copy link to clipboard

Copied

Thank you.

My bad, the path I was looking for was in this screen shot. 

 

list.png

Votes

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
Explorer ,
Oct 19, 2020 Oct 19, 2020

Copy link to clipboard

Copied

Seems in Macos the Scripts folder is Located in `~/Applications/AdobePhotoshop2020/Scripts/`

I got a hint about locating it from an Aftereffects forum

Votes

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 ,
Oct 19, 2020 Oct 19, 2020

Copy link to clipboard

Copied

LATEST

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

 

P.S. Tool presets can often be recorded when the tool can't be directly recorded into an action.

Votes

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