Monday, October 15, 2007

Man, it's so loud in here...

A revised version of the script to pause iTunes briefly while it announces the track info. The other one works OK with headphones on, but not so well over the house speakers.

tell application "iTunes"
    set isPlaying to player state
    pause
    copy name of current track to songName
    copy album of current track to songAlbum
    copy artist of current track to songArtist
end tell
say songName & ", bye" & ", " & songArtist
     & ", from, " & songAlbum
tell application "iTunes"
    if isPlaying is playing then
        play
    end if
end tell

0 comments: