• 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 layer mask scripting - stumped
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Photoshop layer mask scripting - stumped


  • Subject: Re: Photoshop layer mask scripting - stumped
  • From: Roger Howard <email@hidden>
  • Date: Tue, 14 Sep 2004 14:46:50 -0700


On Sep 14, 2004, at 1:35 PM, Martin Orpen wrote:

 Don't let Shane put you off with all that Javascript talk ;-)

Discover the joys of the UI. You can get the contents of a layer mask like this:

tell application "Adobe Photoshop 7.0"
    activate
   set current layer of current document to layer 2 of current document
   select all current document
end tell
tell application "System Events"
    tell process "Adobe Photoshop 7.0"
        launch
       keystroke "\\" using {command down}
        delay 1
       keystroke "v" using {shift down}
        delay 1
       keystroke "c" using {command down}
    end tell
end tell



That should get you started...

Argh, damnit, see my years-long prejudices against UI scripting and now I've come crawling back!


Of course, duh. I actually do most of this manually right now with keyboard shortcuts (as I do with everything in Photoshop, as much as possible). Thanks - this isn't ideal, but it's better than nothing... which seems to be the concensus on the Adobe forums, where someone else started a thread recently on layer mask scripting.

Ok, UI Scripting and Actions will do it... hey, the upshot is I always found writing UI scripts (mostly with Prefab, and QuicKeys) forced me into better commenting habits as it seems to me it's nearly impossible to read complex UI scripts and have a clue what they are doing (without stepping through it)

Thanks Martin,

Roger

PS, I don't mind JavaScript at all, and find the JS implementation in Photoshop CS to generally execute scripts faster than the equivalent AS... but I didn't have much more luck with the JS object model (doesn't seem as is layer masks are fully exposed there either), and the output of Script Listener for this task was absolutely headache-inducing!
_______________________________________________
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
  • Follow-Ups:
    • Re: Photoshop layer mask scripting - stumped
      • From: Martin Orpen <email@hidden>
References: 
 >Re: Photoshop layer mask scripting - stumped (From: Martin Orpen <email@hidden>)

  • Prev by Date: Re: world's largest AppleScript dictionary (was Re: Digital Sigs)
  • Next by Date: Re: Photoshop layer mask scripting - stumped
  • Previous by thread: Re: Photoshop layer mask scripting - stumped
  • Next by thread: Re: Photoshop layer mask scripting - stumped
  • Index(es):
    • Date
    • Thread