Skip to content

Instantly share code, notes, and snippets.

@AJABON
Last active May 12, 2016 09:41
Show Gist options
  • Save AJABON/105021dbe09ffc39a77f2792595fff11 to your computer and use it in GitHub Desktop.
Save AJABON/105021dbe09ffc39a77f2792595fff11 to your computer and use it in GitHub Desktop.
// InDesign_空のオブジェクトを削除
var doc = app.activeDocument; // 処理対象は最前面ドキュメントの中ぜんぶ
// allPageItemsの要素をループ処理開始
for (var i = 0; i < doc.allPageItems.length; i++) {
// ↓i番目要素の、塗りカラー、線カラー両方とも適用スウォッチ名が「なし」なら、という条件文
if (doc.allPageItems[i].fillColor.name == "None" && doc.allPageItems[i].strokeColor.name == "None"){
doc.allPageItems[i].remove(); // オブジェクトを削除
}
alert ("Hello World!"); // 茶目っ気のある終了報告
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment