LoginSignup
0
2

More than 5 years have passed since last update.

【Illustrator】1つのショートカットにロックとロック解除のコマンドをまとめる【ショートカット拡張】

Last updated at Posted at 2018-08-06
  • オブジェクトの選択がされていない場合 ・・・ 「ロック解除」
  • オブジェクトの選択がされている場合 ・・・ 「ロック」
var select = app.activeDocument.selection;
var items= app.activeDocument.pageItems;
var locked = false;

// オブジェクトが選択されている場合
if (select.length > 0){
    app.executeMenuCommand('lock'); // ロック
}
// オブジェクトが選択されていない
else{
    app.executeMenuCommand('unlockAll'); // ロック解除
}
0
2
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
0
2