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!

Reply to thread

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;

};

[/CODE]


What is our favorite program/app? (Hint - it begins and ends with the letter P)
Back
Top