Surely there must be a way to unlock (every layer whose dim placed images is equal to true and printable is equal to false)?
My goal is to delete only those specialty “Template Layers”
I figured out how to delete only those template layers but only after attaching Jim’s script which unlocks “all layers” above it.
It would be nice for other layers that were locked to remain locked.
Can anyone help me out?
-jeff
tell document 1 of application "Illustrator CS"
activate
set topLevelLayers to (every layer whose class of container is document)
repeat with thisLayer in topLevelLayers
my unlockLayers(thisLayer)
end repeat
if ((count of page items) > 0) then set locked of every page item to false
end tell
on unlockLayers(thisLayer)
tell document 1 of application "Illustrator CS"
set locked of thisLayer to false
set subLevelLayers to (every layer of thisLayer)
repeat with thisLayer in subLevelLayers
my unlockLayers(thisLayer)
end repeat
end tell
end unlockLayers
tell document 1 of application "Illustrator CS"
activate
set deleteLayer to (every layer whose dim placed images is equal to true and printable is equal to false)
try
delete deleteLayer
end try
end tell