Re: iTunes script problems
Re: iTunes script problems
- Subject: Re: iTunes script problems
- From: Matthew Smith <email@hidden>
- Date: Fri, 20 Nov 2009 17:11:07 +1100
Hi,
You can't make iTunes play an arbitary list of songs via AppleScript. You need to make that a list of songs somewhere in the iTunes interface first and then play that list. There are several ways you may be able to do this. I am not sure if they are all possible with AppleScript. I'm not on my Mac right now.
1. Create a new playlist containing those songs.
2. Add the songs to iTunes DJ and play them there.
3. Display the playlist in the window, do a query to reduce the list to the desired songs and then play them. This one is not advisable as it won't work if the user changes what is displayed in iTunes.
Your best option I think is the first one, where you can have a specific playlist for your result. This one is definitely scriptable.
--
Matthew Smith
Almost there.
It plays one song and then goes back to other songs (I have it on shuffle). I am trying to get it to select just one group and play only their music.
At least this plays one song of the group I requested.
Chuck
I think you want something like this:
tell application "iTunes"
set myTunes to get search playlist "Saddest Songs Ever" for "Nilsson"
repeat with thisTune in myTunes
play thisTune
end repeat
end tell
The search returns a list, of songs, even if it's just one, so you can either step through the list or play item 1 of the list:
HTH,
ES
On Nov 19, 2009, at 3:45pm, Chuck wrote:
tell application "iTunes"
get search playlist "Get er done P1OFF" for "Moody Blues"
end tell
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden