「TextEdit」の版間の差分
提供: MacWiki
(→AppleScript) |
|||
行48: | 行48: | ||
end tell | end tell | ||
− | |||
**http://www.drycarbon.com/applescript/tips/karino/launch.html launch, run, activate | **http://www.drycarbon.com/applescript/tips/karino/launch.html launch, run, activate | ||
行62: | 行61: | ||
end tell | end tell | ||
− | |||
**http://blogs.dion.ne.jp/fujidana/archives/517367.html | **http://blogs.dion.ne.jp/fujidana/archives/517367.html | ||
**http://www1.odn.ne.jp/~cge02410/backnumber/2006/02/02000446.html | **http://www1.odn.ne.jp/~cge02410/backnumber/2006/02/02000446.html |
2008年3月14日 (金) 21:15時点における版
テキストエディット (TextEdit) とは?
Mac OS X 標準のテキストエディタ。 標準でリッチテキスト、標準テキスト、ワード、HTMLなどのフォーマットを扱うことができる。
機能
- 表
フォーマットメニューからテキスト > 表...とすれば、表を扱うことができる。
- ショートカット
Emacsのようなショートカットキーが使える。
control - f (前方へ一文字すすむ:[←]) control - b (後方へ一文字もどる:[→]) control - p (上の行へ:[↑]) control - n (下の行へ:[↓]) control - a (段落の最初へ:行頭へ) control - e (段落の最後へ:行末へ) control - v (下のページへ:文末へ) control - d (一文字削除 前方へすすむ:デリート) control - h (一文字削除 後方へもどる:バックスペース) control - t (文字の入れ替え:カーソルの左右の文字を入れ替えます) control - y (カットされていたテキストが挿入される:commad-vと使い分けると素晴らしい) control - k (カーソル位置から行末までカット:control - yでカットされていたテキストが挿入される) control - o (カーソル位置に改行を挿入:カーソルは移動しない) esc 単語の途中で候補を示す(ヘルプにはOpt-ESCとあるが?)
AppleScript
- 新規文書 (ウィンドウ) を作成
set theText to "* " & ((current date) as string) & return tell application "TextEdit" 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
- http://www.drycarbon.com/applescript/tips/karino/launch.html launch, run, activate
- 単語の数や文字数を数え上げる
tell front document of application "TextEdit" tell text of it display dialog "ワードカウント結果" & return & return & ¬ "文字数:" & number of every character & return & ¬ "単語数:" & number of every word & return & ¬ "段落数:" & number of every paragraph end tell end tell
関連するソフトウェア
- rtfd2html
RTFD(添付ファイル付きリッチテキスト)ファイルをhtmlファイルに変換するアプリケーション。textutilコマンドのラッパー。
http://pencilsoftware.com/rtfd2html.html