What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Text file from a Tool Preset list


John23K

New Member
Messages
4
Likes
0
Hi

Is it possible to create a text file from a Tool Preset list?

I know you can copy the names individually by clicking rename but that becomes a tedious task when there is fifty plus brushes. I've just spent a couple of hours Googling and couldn't find a solution so hopefully someone here can help me.

cheers
John
 
Hi John

Here's one way to do it if you have Microsoft Excel, I used Excel 2010 and Firefox for this!

Go to the location of the brushes and copy the path as in
C:\Program Files\Adobe\Adobe Photoshop CC 2017\Presets\Brushes

image1.jpg

Open Firefox or another browser and Paste the Path into the address bar
image2.jpg

Then make a selection of the text as shown
image3.jpg

Right click and select Copy
image4.jpg

Open Excel and expand the first Column and then right click and select the Paste option shown
image5.jpg

Then select Column A and right click and select Remove Hypelinks
image6.jpg

Result, you can just delete the other Columns you don't need
image7.jpg

If you want to remove the .abr extension here's a Formula that will do it for you, add this into Cell B1
=LEFT(A1,LEN(A1)-4)
image8.jpg

Then just drag the right bottom corner of the Cell the whole way down to copy the Formula to the other Cells in Column B
image10.jpg
image9.jpg
 
Last edited:
Thanks for the reply, Gedstar

Unfortunately I've already tried a variation on the above with no success. The problem is the Presets/Brush folder holds information for the Brush Presets and not the Tool Presets.

So below and to the right is my Presets/Brush folder and to the left is the Tool Preset folder I'm trying to make a list of.


32230896326_8486aec913_b.jpg
 
Not too sure if this is what you are after, it will create a text file on the desktop with the names of all loaded brushes.

Code:
#target Photoshop;
var f = new File(Folder.desktop + "/Brush List.txt");
f.open("w");
f.writeln(getBrushList().join("\n"));
f.close();
alert("File created \n" + decodeURI(f));

function getBrushList(){
   var desc, brushList, ref;
   ref = new ActionReference();
   ref.putProperty( charIDToTypeID("Prpr"), stringIDToTypeID("presetManager") );
   ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") ); 
   desc = executeActionGet(ref);
   var brushList = desc.getList(stringIDToTypeID("presetManager")).getObjectValue(0).getList(charIDToTypeID("Nm  "));  
   var Names = new Array();
   for (var z = 1; z<brushList.count;z++){
    try{
    Names.push(brushList.getString(z));
    }catch(e){alert(e);return;}
    }
return Names;
};
 
Not too sure if this is what you are after, it will create a text file on the desktop with the names of all loaded brushes.

Thanks Paul. Ran the script and it didn't create the list I was after instead created a list of all the loaded brushes (like it said on the tin) which is very useful in itself

What I ended up doing was creating a screengrab then running it through OCR. Got me about 95% of the way.
 
This should give you a more complete listing...

Code:
#target Photoshop;
var f = new File(Folder.desktop + "/Preset List.txt");
f.open("w");
f.writeln("--- Brushes");
f.writeln(getBrushList(0).join("\n"));
f.writeln("--- Colors");
f.writeln(getBrushList(1).join("\n"));
f.writeln("--- Gradients");
f.writeln(getBrushList(2).join("\n"));
f.writeln("--- Styles");
f.writeln(getBrushList(3).join("\n"));
f.writeln("--- Patterns");
f.writeln(getBrushList(4).join("\n"));
f.writeln("--- shapingCurves");
f.writeln(getBrushList(5).join("\n"));
f.writeln("--- shapingCurves");
f.writeln(getBrushList(6).join("\n"));
f.writeln("--- toolPresets");
f.writeln(getBrushList(7).join("\n"));
f.close();
alert("File created \n" + decodeURI(f));

function getBrushList(num){
   var desc, brushList, ref;
   ref = new ActionReference();
   ref.putProperty( charIDToTypeID("Prpr"), stringIDToTypeID("presetManager") );
   ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") ); 
   desc = executeActionGet(ref);
   var brushList = desc.getList(stringIDToTypeID("presetManager")).getObjectValue(num).getList(charIDToTypeID("Nm  "));  
   var Names = new Array();
   for (var z = 1; z<brushList.count;z++){
    try{
    Names.push(brushList.getString(z));
    }catch(e){alert(e);return;}
    }
return Names;
};
 

Back
Top