Re: Problem with iTunes & AppleScript (1.8.3)
Re: Problem with iTunes & AppleScript (1.8.3)
- Subject: Re: Problem with iTunes & AppleScript (1.8.3)
- From: Martin Michel <email@hidden>
- Date: Fri, 28 Jun 2002 12:49:44 +0200
Am Donnerstag den, 27. Juni 2002, um 19:36, schrieb Chris Espinosa:
On Thursday, June 27, 2002, at 07:06 AM, Martin Michel wrote:
tell application "iTunes"
set the_library to name of playlist 1
set the_tracks to every file track of playlist the_library
repeat with the_track in the_tracks
set the_artist to artist of the_track
display dialog the_artist
end repeat
end tell
This works for us here in our testing. Could you perhaps open the
Event Log, check both check boxes, and run the script again to see what
is failing? Apparently iTunes is not returning a valid name of
playlist 1.
A workaround is, of course, to skip that step entirely. You don't need
to use intermediate variables at all:
tell application "iTunes"
repeat with the_track in every file track of playlist 1
display dialog (get artist of the_track)
end repeat
end tell
Chris
Hi Chris,
it is very strange to me. Your above mentioned code works, iTunes
displays the artists of the tracks correctly. But when I try to execute
the following code the Script Editor always quits unexpectedly:
tell app "iTunes"
set the_tracks to every file track of playlist 1
end tell
or
tell app "iTunes"
set the_library to name of playlist 1 --returns "Library"
set the_tracks to every file track of playlist the_library
end tell
When I try the code in Mac OS 9.2.2 (AppleScript version 1.7) addressing
iTunes 2.0.4 it works just fine (and has worked in Mac OS X before
updating to AS 1.8.3).
I also reinstalled iTunes 2.0.4 under my Mac OS X but this did not solve
the problem. I asked some friends having exactly my environment (Mac OS
X 10.1.5, iTunes 2.0.4, AS 1.8.3) to test the code on their Macs and the
result was that some encounter the same problems, some not. After all I
just wish not to have to reinstall Mac OS X as it would ruin my free
weekend ;-) Well, after all installing Mac OS X is better than watching
Scooby Doo in the cinema *g*
Thanks for helping me, I appreciate your efforts a lot,
Martin
www.soft-o-mat.com
www.ame-electroplating.com
_______________________________________________
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.