Re: Photoshop layer mask scripting - stumped
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