SSブログ

Applescriptで操作するAdobe Photoshop5 [Photoshopスクリプト]

フォトショップでテキストを扱う方法

 

 

tell application "Adobe Photoshop CC 2019"

activate

make new document with properties {name:"Hello, World!", mode:RGB, width:200, height:120}

tell current document

make new art layer with properties {kind:text layer}

tell current layer

tell text object

set contents to "Hello, World!"

set position to {1 as inches, 1 as inches}

set justification to left

set stroke color to {class:RGB color, red:255, green:0, blue:0}

set size to 40

end tell

end tell

end tell

end tell

 

 新しくドキュメントを作って

テキストレイヤーというアートレイヤを追加。

Hello, World!というテキストを、左上から1インチ離れたところに、赤い文字で、40ポイントの大きさで

作成するものです。


 

ss.png

 

 

以下のスクリプトも同じ動作をします。

どのやり方が良いか臨機応変に使っていきましょう。 

 

tell application "Adobe Photoshop CC 2019"

activate

set document1 to make new document with properties {name:"Hello, World!", mode:RGB, width:200, height:120}

set textLayer to make new art layer of document1 with properties {kind:text layer}

set contents of text object of textLayer to "Hello, World!"

set position of text object of textLayer to {1 as inches, 1 as inches}

set justification of text object of textLayer to left

set size of text object of textLayer to 40

set stroke color of text object of textLayer to ¬

{class:RGB color, red:255, green:0, blue:0}

end tell

 

 

 

 

tell application "Adobe Photoshop CC 2019"

activate

set document1 to make new document with properties {name:"Hello, World!", mode:RGB, width:200, height:120}

set textLayer to make new art layer of document1 with properties {kind:text layer}

set properties of text object of textLayer to ¬

{contents:"Hello, World!", position:{1 as inches, 1 as inches}, justification:left, stroke color:{class:RGB color, red:255, green:0, blue:0}, size:40}

end tell

 

 



nice!(1)  コメント(0) 
共通テーマ:パソコン・インターネット

nice! 1

コメント 0

コメントを書く

お名前:
URL:
コメント:
画像認証:
下の画像に表示されている文字を入力してください。

この広告は前回の更新から一定期間経過したブログに表示されています。更新すると自動で解除されます。