Skip to content

Instantly share code, notes, and snippets.

@monokano
Last active March 14, 2025 06:54
Show Gist options
  • Select an option

  • Save monokano/f4f6a63804faedf976a1cd9470f7e642 to your computer and use it in GitHub Desktop.

Select an option

Save monokano/f4f6a63804faedf976a1cd9470f7e642 to your computer and use it in GitHub Desktop.
非表示オブジェクトを表示して選択状態にするInDesign用スクリプト
//非表示オブジェクトを表示して選択状態にするInDesign用スクリプト
//Undo履歴を実行1回で1つにする
app.doScript(Main, ScriptLanguage.JAVASCRIPT, [], UndoModes.ENTIRE_SCRIPT);
function Main() {
//アクティブなスプレッド内を対象にする
var items = app.activeWindow.activeSpread.pageItems;
var targetItems = [];
//非表示オブジェクトを表示する
for (i = 0; i < items.length; i++) {
if(!items[i].visible) {
items[i].visible = true;
targetItems.push(items[i]);
};
};
//処理したアイテムを選択する
app.selection = targetItems;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment