I am trying to create an Applescript to do a High Pass filter in Photoshop PS2. I can get the filter to compile and work, but i can’t seem to get the correct syntax to set the blending mode and the opacity. I would like to set the Blending mode to Hard Light and the Opacity to somewhere around 50% . Can someone please show me how it is done. The code i have so far is included.
PolishPrince
tell application "Adobe Photoshop CS2"
tell front document
-- Current Layer
filter current layer using high pass with options ¬
{radius:5}
-- Set Blending Mode to Hard Light
end tell
end tell
Two things… 1) the correct syntax is Blend Mode, not Blending Mode, and 2) you forgot who you’re talking to on the blend mode line. To alleviate this, talk directly to the layer first, like this:
tell application "Adobe Photoshop CS2"
tell current document
tell current layer -- Talk to the layer directly.
filter using high pass with options {radius:5}
set blend mode to hard light
set opacity to 60
end tell
end tell
end tell
Thanks for the prompt reply. This works very nice. If i wanted to create a new layer called “high pass” and do all of the high pass and blend on that layer, how would i go about that.
PolishPrince, that would look something like this:
tell application "Adobe Photoshop CS"
activate
set docRef to the current document
tell docRef
set MyLayerDupe to duplicate current layer to beginning
set current layer to layer 1
filter current layer using high pass with options {radius:5}
set properties of layer 1 to {name:"High Pass", opacity:50, blend mode:hard light}
end tell
end tell