Deleting Patters using scripting
I would like to make an auto-updater function to reload pattern files when they are updated.
I already have everything working.. reading pattern files, saving the dates, loading patterns, ect...
Only thing I'm still missing is a script that can remove groups.
I can only replace all patterns by loading the first pattern file with "append" false, and the rest as true.
This way, the first load will remove all patterns.
But is there a way to remove only 1 group, so I can load individual pattern files instead of reloading all pattern files for every update on a single pattern file?
Script listener gave me a Dlt event, but nothing that refers to a pattern group name...
var idDlt = charIDToTypeID( "Dlt " );
var desc68 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref6 = new ActionReference();
var idPtrn = charIDToTypeID( "Ptrn" );
var idOrdn = charIDToTypeID( "Ordn" );
var idTrgt = charIDToTypeID( "Trgt" );
ref6.putEnumerated( idPtrn, idOrdn, idTrgt );
desc68.putReference( idnull, ref6 );
executeAction( idDlt, desc68, DialogModes.NO );