// 選択したオブジェクトの詳細な情報を表示する
  (function(){
  var selObj = app.activeDocument.selection;
  if (selObj.length < 1){
  alert("情報を表示したい対象を複数選択してから実行してください");
  return;
  }
  // GUI
  var winObj = new Window("dialog", "ステータス表示", [0, 0, 800, 640]);
  winObj.add("button", [ 10, 50, winObj.frameSize.width-10, 70 ], "完了", { name : "ok" });
  var statusArea = winObj.add("edittext",
  [ 10, 100, winObj.frameSize.width-10, winObj.frameSize.height-40]);
  var prevBtn = winObj.add("button", [10, 10, 110, 40], "前の図形");
  var nextBtn = winObj.add("button", [150, 10, 250, 40], "次の図形");
  var index = 0;  // 選択したオブジェクト(図形)の参照番号
  statusArea.text = getObjectInformation(selObj[index]);
  prevBtn.onClick = function(){
  index = index - 1;
  if (index < 0){ index = 0; }
  statusArea.text = getObjectInformation(selObj[index]);
  }
  nextBtn.onClick = function(){
  index = index + 1;
  if (index >= selObj.length){ index = selObj.length -1; }
  statusArea.text = getObjectInformation(selObj[index]);
  }
  winObj.center();
  winObj.show();
  // オブジェクトの情報を取得
  function getObjectInformation(obj){
  var text = "";
  for(var i in obj){
  try{ var t = checkType(obj[i]);
  }catch(e){ t = "【種類不明】"; }
  try{
  text = text + i + " = " + obj[i] + " | " + t + "\n";
  // objectの場合
  if (t == "object"){
  // 1階層のみ処理する
  for(var j in obj[i]){
  try{ var t1 = checkType(obj[i]);
  }catch(e){ t1 = "【不明】"; }
  try{
  text = text + "  " + j + " = " + obj[i][j] + " | " + t1 +  "\n";
  }catch(e){
  text = text + j + "【取得不可】\n";
  }
  }
  }
  // Arrayの場合
  if (t == "Array"){
  for(var j=0; j<obj[i].length; j++){
  var t2 = checkType(obj[i][j]);
  text = text + "  "+j+":"+obj[i][j]+ " | " + t2 +"\n";
  // objectの場合
  if (t2 == "object"){
  for(var k in obj[i][j]){
  try{
  text = text + "    " + k + " = " + obj[i][j][k] + "\n";
  }catch(e){
  text = text + k + "【取得不可】\n";
  }
  }
  }
  }
  }
  }catch(e){
  text = text + i + " | " + t + "【取得不可】\n";
  }
  }
  return text;
  }
  // オブジェクトの型を調べる
  function checkType(targetObj){
  //$.writeln(targetObj);
  if (targetObj instanceof Array){
  return "Array";
  }
  return typeof(targetObj);
  }
  })();