IllustratorでScriptを書く方法の入門
#adobe
とりあえず動かすために
illustratorの開発documentationがどこにあるのか
Illustrator JavaScript Scripting Reference.pdf
Adobe Developer Console>APIs and Servicesの中にPlugin SDKもScripting Documentどっちもあった
【まとめ】Illustratorスクリプトの開発資料
JavaScriptかAppleScriptで書けるみたい
JSに関して、ほとんどの日本語文献でExtendScriptであることが言及されているのでそうなんだろうけど、公式のリファレンス範囲でそうである記述が見つからないのでなんかモヤモヤするtndhjm.icon
ていうか、ScriptingのGet Start的なドキュメントが見当たらないtndhjm.icon
Where do I find the JavaScript Tools Guide
なぜかExtendScriptである記述と、そのGet StartがCEPのリポジトリにあった
https://github.com/Adobe-CEP/CEP-Resources/blob/master/ExtendScript-Toolkit/Guides/Japanese/Adobe%20Intro%20to%20Scripting.pdf
日本語もある!!
とりあえずHello World
code:js
alert("Hello World!");
これをjsx形式で保存して、ファイル>スクリプト>その他のスクリプトで該当ファイルを選択すれば実行可能
https://scrapbox.io/files/64cf482dfdb4b4001ce117ec.png
Reference
https://github.com/johnwun/js4ai
ExtendScriptについて知ってることをまとめた
Get Started
公式Debuggerがあるが...
https://marketplace.visualstudio.com/items?itemName=Adobe.extendscript-debug
これはApple Silicon非対応で動かなかった
https://scrapbox.io/files/64cfc35736fedf001bbaa3c5.png
Rosettaにするのもありだけど流石にめんどくさすぎる
DOM的な概念がある
Application Obj>Document Obj>Layer, Channel, Page, Text frameなど
テキストパスでHello World
code:js
var text = app.activeDocument.textFrames.add();
text.contents = "Hello World";
text.left = app.activeDocument.width/2-text.width/2;
text.top -= app.activeDocument.height/2;
https://scrapbox.io/files/64cfc35e36fedf001bbaa423.png
より高度な機能を記述するために
ファイル>スクリプト以外の起動の仕方があるか
できれば右クリックのウィンドウ内に項目追加したりしたりとか。
基本的にはプラグインという扱いになる?
C++
※Keyboard maestroで登録している人も結構いるっぽい