Script to run action on all smart objects
Hi,
I am brand new to scripting and I've pieced together the below from other forum posts. I am trying to open all smart objects in a document and clear guides with one click (or shortcut).
It is currently working when I run it with a layer selected, but I am having trouble with how to make it run for all of the layers in the document, not just the selected/active layer. I appreciate any help or suggestions!
if (app.activeDocument.activeLayer.kind == "LayerKind.SMARTOBJECT") {
app.doAction("ClearGuides", "SmartObjects");
}
Thank you!
