Copy link to clipboard
Copied
Hi there
Is it possible to select a Tool Preset (not Brush Preset) using a script?
Let's say I have a Brush tool preset named "My Brush" and also an Eraser tool preset named "My Eraser" and also a MixerBrush tool preset named "My Mixer", etc. etc. and so on.
Right now I have thousands of tool presets and scrolling through the list to find what I want is almost impossible now, there are too many.
Is there a quick way to just select any of those presets by a script?
Thank you ![]()
Copy link to clipboard
Copied
The only way I can figure this out is to use the scriptlistener and adjust as necessary. This code works, but you must un-check "Current Tool Only" in the Tool Presets Panel for this to work correctly as I can't figure out a way to un-check it using a script. Maybe someone can fill that part in..
Anyhow all you need to is paste in the name of your tool preset inside the quotations:
var FIVE = charIDToTypeID( "slct" );
var SIX = new ActionDescriptor();
var SEVEN = charIDToTypeID( "null" );
var EIGHT = new ActionReference();
var NINE = stringIDToTypeID( "toolPreset" );
EIGHT.putName( NINE, "ENTER YOUR TOOL PRESET NAME HERE" );
SIX.putReference( SEVEN, EIGHT );
executeAction( FIVE, SIX, DialogModes.NO );
Copy link to clipboard
Copied
I looked in the DOM reference but could not find any reference to tool presets, so it appears that AM code is the only way to script… Which begs the question, what does this gain over simply using an action in the first place?
Copy link to clipboard
Copied
I need to select a tool preset via a .jsx script if possible, not via actions. I want to be able to run this .jsx script via a 3rd-party application. The code I posted indeed works, but the only barrier to it is that "Current Tool Only" needs to be un-checked at all times. I can't find a way to ensure that it is unchecked at all times using a script.
Copy link to clipboard
Copied
There is no way to record this via an action, and unless I am missing something the AM code recorded by ScriptListener has the same limitation.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Cycle Tool Presets Package Added Sept. 6, 2017
Contains
Copy link to clipboard
Copied
but how do any of those scripts allow me to choose an individual tool preset via scripting?
Copy link to clipboard
Copied
BY assigning an F fey shortcuts for a tool when you use the shortcut you can cycle through your list of presets for that tool So you can sete different function keys for different tools switch between tools and their presets switching tool will not cycle to the next preset but resume with the tool current setting using the shortcut again will cycle to next or previous if you add a modifier key to the shortcut (Shift , Alt or Ctrl)

Copy link to clipboard
Copied
Here Re: get toolpresets for certain tool
you can find a lot of useful things.
Copy link to clipboard
Copied
thanks to all of you. You have all provided much information on this. I will take the time to research through all of your suggestions and then will reply here once a solution is found.
Thank you ![]()
Find more inspiration, events, and resources on the new Adobe Community
Explore Now