Re: iTunes Help
Re: iTunes Help
- Subject: Re: iTunes Help
- From: Chris Garaffa <email@hidden>
- Date: Tue, 21 Dec 2004 23:11:18 -0500
On Dec 21, 2004, at 5:01 PM, Richard Darenberg wrote:
Chris,
Thanks for responding so quickly. Unfortunately, this script would compile but not run. The error message
was "handler only handles single objects"
Also, I wasn't very clear on what I was trying to do. I really only want to play music from a playlist on a shared library.
I was thinking for error checking purposes, I should first make sure the shared library was available before trying to play it.
Is there a special way to tell iTunes to play music on a shared library? My shared library name is "PM Server Music" and the
playlist I'm looking for is called "Christmas". (Imagine that!).
Rick,
Sorry about that - the second line of the script (after the tell block opens) should be:
set theSource to first item of (every source whose kind is shared library)
I'd forgotten to put the parentheses in there.
Try this script out to play music from the shared library
--Tested with iTunes 4.7,
tell application "iTunes"
set theSource to first item of (every source whose kind is shared library and name is "NilTunes")
set thePlaylists to every playlist of theSource
set thePlaylist to item 1 of (every playlist of theSource whose name is "Chrismas") play first track of thePlaylist
end tell
And of course, let me know how it goes.
--
Chris Garaffa
email@hidden
http://incessant.nilzero.com
thanks,
Rick Darenberg
--------------------------------------------------
The most insightful thing done to the Windows 9X
"Start" menu was to make "Shut down" the first option.
On Dec 20, 2004, at 10:13 PM, email@hidden wrote:
On Dec 20, 2004, at 11:21 PM, Richard Darenberg wrote:
I'm a newby to Applescript but I'm looking for a way to check iTunes
for a shared library and if it's there
select a playlist from that shared library.
Hi Rick,
This will give you a list of all the name of all playlists on the first
shared library that iTunes is currently connected to
--Tested with iTunes 4.7
tell application "iTunes"
set theSource to first item of every source whose kind is shared
library
name of every playlist of theSource
end tell
The list of playlists will begin with the name of the shared library
itself.
When you say, "select a playlist from that shared library," what
exactly do you want to do? Have iTunes show the tracks of the shared
library? Or do you mean play that playlist?
Hope this helps...
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden