スクリプト名:readDisTune |
(* このHTML書類はぴよまるソフトウェアさんの AS Publisher v1.0 を使用して作成されました。 http://www.appleco.jp/piyomarusoft/ このページ下部にある「新規書類にペースト」というリンクをクリックすると スクリプトエディタが起動して新規にスクリプト書類が作成されます。 適当なファイル名を付けて"スクリプト"形式で保存してください。 *) tell application "System Events" if (exists of (processes whose name is "iTunes")) is true then stateofPlayer() of me end tell on stateofPlayer() tell application "iTunes" if player state is playing or player state is paused then displayLyrics() of me end tell end stateofPlayer on displayLyrics() tell application "iTunes" try if (lyrics of current track) is missing value then return set theLyrics to (lyrics of current track) set taggedLyrics to "" as Unicode text repeat with i from 1 to (number of paragraphs of theLyrics) set taggedLyrics to taggedLyrics & (paragraph i of theLyrics) & "<br>" end repeat set readDisTune to {titleontag:(name of current track), artistontag:(artist of current track), lyricsontag:taggedLyrics} displayAlert(readDisTune) of me end try end tell end displayLyrics on displayAlert(readDisTune) tell application "iAlert" post alert name "readDisTune" application name "iTunes" values readDisTune end tell end displayAlert |