if(app.activeDocument.selection.length != 0){ obj = app.activeDocument.selection[0]; if(obj.typename == "TextFrame"){ if(obj.lines.length > 0){ fntS = obj.textRange.characterAttributes.textFont.name; sizS = obj.textRange.characterAttributes.size; app.activeDocument.selection = null; doc = app.activeDocument; Frs = doc.textFrames; for(Fr=0; Fr < Frs.length; Fr++){ if(Frs[Fr].lines.length > 0){ fntA = Frs[Fr].textRange.characterAttributes.textFont.name; sizA = Frs[Fr].textRange.characterAttributes.size; if((fntS == fntA) & (sizS == sizA)) { Frs[Fr].selected = true; } } } sizS = Math.round(sizS*141.1)/100; alert(fntS + ", " + sizS + "Qを" + doc.selection.length + "個選択しました"); }else{ alert("空のテキストオブジェクトは選べません"); } }else{ alert(obj+"のため実行できませんでした〜"); } }else{ alert("なんか選んでから実行してちょうだい"); }