1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

illustratorCC2024プラグインでダイアログを使う

Posted at

Adobe illustrator CCでダイアログを使う場合inDesignと挙動が違ったためメモ。

参考

環境

ダイアログに入力項目を入れておく場合

inDesignとの違いは、textEditboxesが出てこない、add関数を使うなど、全く違ってしまった(両方共通の方法があるかもしれませんが、今回見つけられませんでした)

// 実施したい処理
function run(inPutText) {
    alert(inPutText);
}

// ダイアログを作成
var dialog = new Window('dialog', 'Input Text');
with (dialog) {
    var inputArea = add('edittext', undefined, '', { multiline: true, scrolling: true });
    inputArea.size = [300, 100];
    var okButton = add('button', undefined, 'OK', { name: 'ok' });
}
okButton.onClick = function() {
    run(inputArea.text);
    dialog.close();
};
dialog.show();

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?