ExtendScript Toolkitを使って、特定のバージョンのPhotoshopやIllustrator、After EffectsなどのAdobeアプリケーションでスクリプトを実行する方法をご紹介します。
忘れやすいアプリ名のバージョン指定もまとめていますので、リファレンスとしてもお使いください。
目次
任意のアプリにスクリプトを実行するには?
ExtendScript Toolkitでは、スクリプトを特定のAdobeアプリケーションに向けて実行することが可能です。

基本的な手順は以下の通りです:
- ExtendScript Toolkitを起動
- スクリプトファイル(.jsx)を読み込み
- 対象のアプリをプルダウンから選択して実行
また、スクリプト内に #target
ディレクティブを記述することで、対象アプリとそのバージョンを明示的に指定することもできます。
例えば、以下のように記述すれば、After Effects CS6でスクリプトが実行されます:

#target aftereffects-11
このようにして、アプリのバージョンを指定して正確な環境でスクリプトを動かすことが可能です。
各アプリケーションのバージョン指定一覧
アプリごとに、バージョンを指定するためのコードをまとめました。
Photoshopのバージョン指定
#target photoshop // 最新のPhotoshop
#target photoshop-110 // Photoshop CC 2017
#target photoshop-100 // Photoshop CC 2015.5
#target photoshop-90 // Photoshop CC 2015
#target photoshop-80 // Photoshop CC 2014
#target photoshop-70 // Photoshop CC
#target photoshop-60 // Photoshop CS6
#target photoshop-50 // Photoshop CS5
Illustratorのバージョン指定
#target illustrator // 最新のIllustrator
#target illustrator-20 // Illustrator CC 2015.3
#target illustrator-19.2 // Illustrator CC 2015.2
#target illustrator-19.0 // Illustrator CC 2015
#target illustrator-18 // Illustrator CC 2014
#target illustrator-17 // Illustrator CC
#target illustrator-16 // Illustrator CS6
#target illustrator-15 // Illustrator CS5
After Effectsのバージョン指定
#target aftereffects // 最新のAfter Effects
#target aftereffects-13.8 // After Effects CC 2015.3
#target aftereffects-13.7 // After Effects CC 2015.2
#target aftereffects-13.6 // After Effects CC 2015.1
#target aftereffects-13.5 // After Effects CC 2015
#target aftereffects-13 // After Effects CC 2014
#target aftereffects-12 // After Effects CC
#target aftereffects-11 // After Effects CS6
#target aftereffects-10 // After Effects CS5
まとめ
Adobe ExtendScript Toolkitでは、#target
を使うことで任意のアプリケーションバージョンに合わせてスクリプトを実行できます。バージョン名は少しややこしいので、この記事をブックマークしておくと便利です。