Skip to main content
Mattmcquiff
Inspiring
June 20, 2013
Answered

Resize Canvas applescript using the relative tick?

  • June 20, 2013
  • 1 reply
  • 2218 views

I'm using this

tell application "Adobe Photoshop CS6"

  resize canvas height -1 anchor position top center

end tell

I want to reduce the size of the image by 1 pixels from the top center. But when I do it manually I would use the "relative" check box,

How can I do this?

please

This topic has been closed for replies.
Correct answer Muppet Mark

tell application "Adobe Photoshop CS5"

          tell document 1

  resize canvas height (height - 1) anchor position top center

          end tell

end tell

1 reply

pixxxelschubser
Community Expert
Community Expert
June 20, 2013

Sorry,

only in Javascript (ala Michael L Hale)

activeDocument.resizeCanvas (undefined,UnitValue((activeDocument.height.as('px')-1),"px"), AnchorPosition.TOPCENTER);

Perhaps you can translate this by yourself.

Inspiring
June 20, 2013

As I understand it, AS has a command to execute javascript so you shouldn't need to translate unless you want pure AS. Look under 'do javascript' in the Photoshop AppleScript Reference.

Muppet MarkCorrect answer
Inspiring
June 20, 2013

tell application "Adobe Photoshop CS5"

          tell document 1

  resize canvas height (height - 1) anchor position top center

          end tell

end tell