Free script: Remove Selected
Hi all,
I wanted to share a super simple script that creates a checkbox for removing Channels, Paths, Colour Pickers and/or LayerComps allowing a simple interface in case you don't always wish to remove all.
Can someone test on Windows for me
#target photoshop
//Created by Dale R, for public and commercial use
//global variables
var w = new Window('dialog', 'Batch Remove');
w.preferredSize = [50,100];
w.alignChildren = "left"; // align checkboxes to left
// creating buttons and checkboxes
var ck1 = w.add("CheckBox { text: 'Paths', value: false}");
var ck2 = w.add("CheckBox { text: 'Channels', value: false}");
var ck3 = w.add("CheckBox { text: 'Layer Comps', value: false}");
var ck4 = w.add("CheckBox { text: 'Colour Samplers', value: false}");
var p = w.add ('panel', undefined)
p.alignment = "center";
var btn = p.add('button', undefined, 'Run')
p.add ("button", undefined, "Cancel")
btn.onClick = function () {
w.close();
if (ck1.value == true) {
app.activeDocument.pathItems.removeAll();
}
if (ck2.value == true) {
app.activeDocument.channels.removeAll();
}
if (ck3.value == true) {
app.activeDocument.layerComps.removeAll();
}
if (ck4.value == true) {
app.activeDocument.colorSamplers.removeAll();
}
}
w.center();
w.show();
