Copy link to clipboard
Copied
I have a simple script that I run from within an Action that flattens layers, deletes paths + channels + layer comps from files.
app.activeDocument.flatten();
app.activeDocument.channels.removeAll();
app.activeDocument.pathItems.removeAll();
app.activeDocument.layerComps.removeAll();
It works fine within PS.
If I run the Action through Bridge under Tools/Batch on files, the resulting process always throws up a dialog asking if I want to remove the paths from the files.
Why is this happening only when I run the Action through Bridge?
Thanks.
displayDialogs = DialogModes.NO; with(activeDocument) {
flatten(), arr = ['layerComps', 'pathItems', 'channels']
while(itm = arr.pop()) eval(itm + '.removeAll()')
}
Copy link to clipboard
Copied
displayDialogs = DialogModes.NO; with(activeDocument) {
flatten(), arr = ['layerComps', 'pathItems', 'channels']
while(itm = arr.pop()) eval(itm + '.removeAll()')
}
Copy link to clipboard
Copied
Sorry, I didn't see your post before I posted my solution. Thanks.
Copy link to clipboard
Copied
Time to mark it as solved to let others know it's solved btw did you solve that problem:
Removing number sequence in 'Export layers to files" in CS5​ / you may post your script...
Copy link to clipboard
Copied
I think I solved the issue by using a different script posted here in the forum.
#target photoshop
var theImage = app.activeDocument;
// supress dialog windows
displayDialogs = DialogModes.NO
// flatten image
theImage.flatten();
// delete paths
theImage.pathItems.removeAll();
// delete alphas
theImage.channels.removeAll();
// delete layercomps
theImage.layerComps.removeAll();
This seems to work fine from within Bridge.
Copy link to clipboard
Copied
Just stumbled over this old post, a related topic can be found here:
https://community.adobe.com/t5/photoshop/free-script-remove-selected/m-p/11069360