Tex-Edit Plus
提供: MacWiki
Tex-Edit Plus とは?[編集]
SimpleText を機能強化したエディタ。1,800円のシェアウェア。 AppleScript の機能が豊富。
AppleScript[編集]
- 新規文書 (ウィンドウ) を作成
set theText to "* " & ((current date) as string) & return tell application "Tex-Edit Plus" activate if not (exists front document) then make new document if text of front document is "" then set theDoc to front document else set theDoc to make new document end if set text of theDoc to theText -- set size of text of theDoc to 14 end tell
- 単語の数や文字数を数え上げる
tell front document of application "Tex-Edit Plus" set theText to (selection of it) as string if (length of theText) = 0 then set theText to text of it display dialog "ワードカウント結果" & return & return & ¬ "文字数:" & number of every character of theText & return & ¬ "単語数:" & number of every word of theText & return & ¬ "段落数:" & number of every paragraph of theText end tell