Re: Delete layer in Photoshop
Re: Delete layer in Photoshop
- Subject: Re: Delete layer in Photoshop
- From: Luca Pozzato <email@hidden>
- Date: Tue, 17 Apr 2007 17:55:52 +0200
Hi Ken,
tell application "Adobe Photoshop CS2" tell current document if (count of layers) > 1 then -- Delete is not available if document has 1 layer only delete (first layer whose name is "Shape 1") end if end tell end tell
Luca
On 17/apr/07, at 16:00, Fleisher, Ken wrote: Hi all. I need to delete a layer in Photoshop that has the name “Shape 1”. The other identifying attribute is it will be the only layer resulting from using the pen tool. I have been able to make this happen, but I’m looking for a more elegant way. I appreciate any suggetions. Thanks!
Here is what I have done so far (which does work correctly):
tell application "Adobe Photoshop CS2" tell current document set n to name of every layer set c to 1 repeat with i in n if contents of i = "Shape 1" then delete layer c end if set c to c + 1 end repeat
end tell end tell
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden