paragraphを合体したもの(全テキスト)とlineを合体したもの(見えているテキスト)を比べてオーバーフローしていたら警告する。
tell application "Adobe Illustrator" tell document 1 repeat with tFrame in every text frame if kind of tFrame is {area text} then if my overflow(tFrame) then display dialog "オーバーフロー:" & contents of tFrame end if end if end repeat end tell end tell on overflow(tFrame) set OriginalDelimiters to AppleScript's text item delimiters set AppleScript's text item delimiters to "" tell application "Adobe Illustrator" set myLastP to (contents of every paragraph of tFrame) as string set myLastL to (contents of every line of tFrame) as string set AppleScript's text item delimiters to OriginalDelimiters if myLastP is not myLastL then set AppleScript's text item delimiters to OriginalDelimiters return true else set AppleScript's text item delimiters to OriginalDelimiters return false end if end tell end overflow
コメントする