AppleScriptで曲の変わり目に通知が来るようにするまで
音楽好きの猛者ならいつ何時でも曲の情報を知りたいはずでしょう(適当)しかしそのためだけに通知センターを開くのはよろしくない.それならば曲の変わり目に通知を入れれば一瞬で曲名,アルバム名をみることができるのではないか!早速作ってみた.
property theName : "" tell application "iTunes" if theName is "" then set theName to name of current track end tell on idle tell application "iTunes" try set tmpName to name of current track on error set tmpName to theName end try if tmpName is not theName then display notification "Album Name :" & album of current track with title "Album Artist :" & album artist of current track subtitle "Track Name :" & name of current track set theName to tmpName return 1 end if end tell end idle