最前面のドキュメントの各行を取り出す

TextEditで表示中の最前面のドキュメントの各行を取り出すAppleScriptです。

tell application "TextEdit"
if exists front document then
tell front document
set retText to returnTheTextDividedByLineFeedCode(get text of it) of me
end tell
end if
end tell

on returnTheTextDividedByLineFeedCode(theText)
set tmpDelim to AppleScript's text item delimiters
set AppleScript's text item delimiters to {ASCII character 10, ASCII character 13}
set retStr to text items of theText
set AppleScript's text item delimiters to tmpDelim
return retStr
end returnTheTextDividedByLineFeedCode

更新履歴

inserted by FC2 system