InDesign テキストフレームのオーバーフローを取得する AppleScript
2-2 01 オーバーフローしているページをダイアログに表示
- 作者: (株)シータス,古籏一浩
- 出版社/メーカー: 技術評論社
- 発売日: 2008/11/25
- メディア: 大型本
- 購入: 5人 クリック: 91回
- この商品を含むブログ (8件) を見る
-- まずは部品作り --ページ数の取得 tell application "Adobe InDesign CS6" number of page of active document end tell -- 指定ページに配置されたテキストフレームの数を取得 set myPage to 3 tell application "Adobe InDesign CS6" number of every text frame of page myPage of active document end tell -- テキストフレームがオーバーフローしているか? set myPage to 2 set fIdx to 1 tell application "Adobe InDesign CS6" overflows of text frame fIdx of page myPage of active document end tell
部品が揃ったので、まとめ
tell application "Adobe InDesign CS6" tell active document set pMax to number of pages repeat with pidx from 1 to pMax tell page pidx set fMax to number of every text frame repeat with fIdx from 1 to fMax if overflows of text frame fIdx is true then display dialog "" & pidx & "ページにオーバーフローしたテキストフレームあり[" & fIdx & "]" end if end repeat end tell end repeat end tell end tell
--実行結果
- OS X 10.8.5
- Adobe InDesign CS6, version: 8.0.2.413