• 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: Photoshop Help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Photoshop Help


  • Subject: Re: Photoshop Help
  • From: Stan <email@hidden>
  • Date: Fri, 30 Jun 2006 18:03:25 -0700
  • Thread-topic: Photoshop Help

On 6/30/06 12:34 PM, Monte Babington wrote:

> The trouble is that I need the selection to be in the shape of a layer.
> I'll use that selection to delete an area of another layer later in the
> script.
>
> I tried using the select all method and then pasting to an alpha channel,
> but the position changes.  So my question is:
>
> Does anyone know how to either:
>
> 1) Use the current layer to generate a selection shape
>
> 2)  Generate an alpha channel from the current layer without changing
> position?


Okay, this one is REALLY ugly, but it works. For some reason, moving the
layer's content forces the selection to conform to the layer. (This is a
trick I discovered in the GUI that just happens to work via script, as
well.)

tell application "Adobe Photoshop CS2"
    tell document 1
        set current layer to layer "Layer 1"
        select all
        translate layer "Layer 1" delta x 1 -- move 1 pixel right
        translate layer "Layer 1" delta x -1 -- move back 1 pixel left
    end tell
end tell

Stan Cleveland
Color Technology Inc.
Portland, Oregon

"It isn't pollution that's harming the environment. It's the impurities in
our air and water that are doing it." -- Former U.S. Vice President Dan
Quayle


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Photoshop Help (From: Monte Babington <email@hidden>)

  • Prev by Date: Re: Photoshop Help
  • Next by Date: Saving parts and settings
  • Previous by thread: Re: Photoshop Help
  • Next by thread: Shell game
  • Index(es):
    • Date
    • Thread