2009/06/04 (木)
■ MacNicoTunes

http://brpg.hp.infoseek.co.jp/macnicotunes/
これはすばらしいスタンドアロンプレイヤー。
で、他のアプリからスクリプトで MacNicoTunes で動画開きたいんですが、AppleScript でイベント送るのはどうにもうまくいかなくて、とりあえず
on run argv
tell application "System Events"
set the clipboard to item 1 of argv
tell process "MacNicoTunes"
set frontmost to true
click menu item "Open Video.." of menu "File" of menu bar 1
keystroke "v" using {command down}
keystroke return
end tell
end tell
end run
みたいに無理矢理やってうごいてるんですが、AppleScript の口なり open -a MacNicoTunes で開けるようにするのは難しいでしょうかねー。Dock にリンクをドロップして開く機能はあるので、口はありそうなんですが、ソースをみた感じでは AppleScript から直接イベントを送るのは難しそうでした。
コメント