0295名称未設定
2014/12/10(水) 06:11:13.61ID:8lxhxVtu0--ファイルパスの例"/Users/ユーザー名/Desktop/ファイル名.txt"
set filePath to "ファイルパス" as POSIX file
tell application "Jedit X"
activate
open file filePath
tell front document
-- カーソルをドキュメントの末尾に移動
set docLen to textlen + 1
set selected character range to {loc:docLen, len:0}
--末尾に改行×4と日時を挿入
set selected text to return & return & return & return & "---" & (current date) & "---"
--日時を挿入した行の2行上にカーソルを移動
set theRange to selected character range
set loc of theRange to (loc of theRange) + 2
set len of theRange to 0
set selected character range to theRange
end tell
end tell