• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Delete layer in Photoshop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Delete layer in Photoshop
      • From: "Fleisher, Ken" <email@hidden>
References: 
 >Delete layer in Photoshop (From: "Fleisher, Ken" <email@hidden>)

  • Prev by Date: Re: applescript uninstaller delete itself & customizing applescript application bundle binary filename (CFBundleExecutable)
  • Next by Date: Re: applescript uninstaller delete itself & customizing applescript application bundle binary filename (CFBundleExecutable)
  • Previous by thread: Delete layer in Photoshop
  • Next by thread: Re: Delete layer in Photoshop
  • Index(es):
    • Date
    • Thread