AppleScript でテキストエディットを操作してみます。
まずはテキストエディットの新しいウィンドウを開いてみます。
開いたウィンドウのタイトルをつけてみます。
その新しいウィンドウの中に『 Hello, script! 』と表示させてみます。
もう少し遊んでみます。
TextEditを触ってみる
命令作ってラクしよう
おもろい、めずらしいアップルスクリプト発表会 6
Application Architecture: Scripting
まずはテキストエディットの新しいウィンドウを開いてみます。
tell application "TextEdit" to make new document
開いたウィンドウのタイトルをつけてみます。
tell application "TextEdit" to make new document
tell application "TextEdit" to set name of front window to "かちかち"
その新しいウィンドウの中に『 Hello, script! 』と表示させてみます。
tell application "TextEdit" to make new document
tell application "TextEdit" to set name of front window to "かちかち"
tell application "TextEdit" to set text of front document to "Hello, script!"
もう少し遊んでみます。
tell application "TextEdit"
activate
make new document at beginning of documents
set name of front window to "かちかち"
set text of front document to "Hello"
delay 2
set text of front document to "Hello, s"
delay 1
set text of front document to "Hello, sc"
delay 1
set text of front document to "Hello, scri"
delay 1
set text of front document to "Hello, scrip"
delay 1
set text of front document to "Hello, script"
delay 1
set text of front document to ""
delay 1
set text of front document to "Hello, script!"
delay 1
set text of front document to ""
delay 2
set text of front document to "Hello, script!!"
end tell
-- Mac OS X 10.4.8 on Intel mac mini
TextEditを触ってみる
命令作ってラクしよう
おもろい、めずらしいアップルスクリプト発表会 6
Application Architecture: Scripting