Re: How to play a audio CD playlist with apple script
Re: How to play a audio CD playlist with apple script
- Subject: Re: How to play a audio CD playlist with apple script
- From: Mr Tea <email@hidden>
- Date: Fri, 03 May 2002 14:05:52 +0100
This from Stanley - dated 3/5/02 11.55 am:
>
I want to write an apple script which can play audio CD tracks (in iTunes
>
2.0.3). I ever tried to duplicate a a new playlist of audio CD playlist and
>
play it. I think my problem is: How to play a audio CD playlist or a playlist?
Hi, Stanley.
Here are some examples to get you started. You will need to change the names
of tracks and playlists, obviously. And, of course, each of the examples
well need to be wrapped in an iTunes 'tell' block. In some cases, playlists
have been written into variables to keep the lines short. This is not an
essential step.
To play an audio CD playlist:
play audio CD playlist "Clangers" of source "Clangers"
-- caution: iTunes may get confused if you change the playlist name
To play a track from an audio CD playlist
set theCD to audio CD playlist "The Roches" of source "The Roches"
play track "Damned Old Dog" of theCD
-- or use a number to specify the track
To play a playlist that you have made:
play playlist "Sounds of the 70s"
To play a specified track from a playlist:
play track "Gary Gilmore's Eyes" of playlist "Music for Ollie"
--or use a track number
To play a random track from a playlist or audio CD:
set thePlaylist to playlist "System alert sounds"
-- or specify a CD playlist instead
set theCount to count of tracks of thePlaylist
set X to random number from 1 to theCount
play track X of thePlaylist
And finally, to play a CD that is displayed in the iTunes window (eg, when
you have just inserted it or launched iTunes with the CD mounted)
set theSongs to view of window 1
play theSongs
HTH
Mr Tea
--
Brew of the day: Darjeeling
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.