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.
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
...
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'
*/
Copy link to clipboard
Copied
Thanks. But how do I use the script in Actions ?
Copy link to clipboard
Copied
Here is what I read about how to use scripting - https://helpx.adobe.com/photoshop/using/scripting.html
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 ?
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.
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
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.
Copy link to clipboard
Copied
Thank you.
My bad, the path I was looking for was in this screen shot.
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
Copy link to clipboard
Copied
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.