Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
GetiTunesInfo.applescript
-- GetiTunesInfo.applescript |
set savedTextItemDelimiters to AppleScript's text item delimiters |
set AppleScript's text item delimiters to {"**"} |
tell application "iTunes" |
set playerState to player state |
if playerState is playing then |
set theStreamTitle to current stream title |
set theTrack to current track |
set theTrackTitle to name of theTrack |
set theTrackArtist to artist of theTrack |
set theTrackAlbum to album of theTrack |
set theInfo to {playerState, theStreamTitle, theTrackTitle, theTrackArtist, theTrackAlbum} as string |
else |
set the info to playerState |
end if |
end tell |
Copyright © 2006 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2006-02-23