2011年9月8日木曜日

【AppleScript】ダイアログボックスを出す。

AppleScriptでダイアログボックスを出す。
あると便利だったりするのでメモ。
1on run ARGV
2  tell application "Finder"
3    activate
4    set msg to item 1 of argv
5    display dialog msg
6  end tell
7end run

コマンドラインで実行権限を与えてあげる
1chmod +x alert.applescript

実行
1osascript alert.applescript "Hello world"


結果

0 件のコメント:

コメントを投稿