2017-07-25 8 views
0

AppleScriptを使用してPhotoshopでレイヤーの高さまたはレイヤーの選択を取得しようとすると、多くの問題が発生します。私の最終目標は、レイヤAの高さを取得し、次にレイヤBの高さを求め、その差を見つけることです。それははるかに大きなスクリプトの一部ですが、私がやることや検索は答えを出すようなものではありません。AppleScriptを使用してPhotoshopでレイヤーまたは選択の高さを取得

ご協力いただきありがとうございます。

答えて

0
tell application "Adobe Photoshop CC 2015.5" -- replace with the version of Photoshop you have 
    activate 
    set theDimensions to bounds of current layer of document 1 
    set theWidth to item 3 of theDimensions 
    set theHeight to item 4 of theDimensions 
    set theDimensions to theWidth & theHeight 
end tell 

私はPhotoshopドキュメントの測定単位としてインチを使用していますので、このスクリプトは値を結果のインチ単位で返します。私は高さのバージョンが唯一の

あるだけでここ

それらをコメントアウト、あなたはピクセルまたは他のを使用する場合は、このスクリプトで幅の値を必要としない場合は...このスクリプトは、適切な値

を返しますと仮定します

tell application "Adobe Photoshop CC 2015.5" -- replace with the version of Photoshop you have 
    activate 
    set theDimensions to bounds of current layer of document 1 
    --set theWidth to item 3 of theDimensions 
    set theHeight to item 4 of theDimensions 
    --set theDimensions to theWidth & theHeight 
end tell 
関連する問題