AppleScriptでの改行
tell application "Jedit X"
activate
make new document with properties {encoding:"Unicode (UTF-8)", line endings:CRLF}
tell document 1
set theText to ""
set theText to theText & tab & "1行目はキャリッジリターン行頭復帰 CR (0x0D) Mac改行" & tab & return
set theText to theText & tab & "2行目はキャリッジリターン行頭復帰 CR (0x0D) Mac改行" & tab & "\r"
set theText to theText & tab & "3行目はキャリッジリターン行頭復帰 CR (0x0D) Mac改行" & tab & (ASCII character 13)
set theText to theText & tab & "4行目はリターン改行 LF (0x0A) UNIX改行" & tab & linefeed
set theText to theText & tab & "5行目はリターン改行 LF (0x0A) UNIX改行" & tab & "\n"
set theText to theText & tab & "6行目はリターン改行 LF (0x0A) UNIX改行" & tab & (ASCII character 10)
set theText to theText & tab & "7行目はリターン改行 CRLF (0x0D0x0A) Windows改行" & tab & return & linefeed
set theText to theText & tab & "8行目はリターン改行 CRLF (0x0D0x0A) Windows改行" & tab & "\r\n"
set theText to theText & tab & "9行目はリターン改行 CRLF (0x0D0x0A) Windows改行" & tab & (ASCII character 13) & (ASCII character 10)
set selected text to theText
end tell
end tell
| 固定リンク
「JeditXAppleScript」カテゴリの記事
- htmlentities(2021.10.04)
- 【Jedit Ω】選択HTMLをhtmlentities変換してBLOG等に貼り付けられるようにする(2021.09.12)
- AppleScriptでの改行(2011.12.24)
- [make new document] properties付きでドキュメントを作る(2011.12.23)