Refreshing itunes selection
Refreshing itunes selection
- Subject: Refreshing itunes selection
- From: Lewis Butler <email@hidden>
- Date: Sun, 25 May 2003 21:12:23 -0600
Since iTunes 4 includes artwork, I want to force itunes to refresh the
selection so that I can easily see if a track has associated artwork. I
through this together and I have to admit, I expected it to work:
on idle
tell application "System Events"
tell process "iTunes"
keystroke "L" with command down
delay 5
end tell
end tell
end idle
I saved it as an application and told it to stay open. All I get is a
system beep after 5 seconds. Trying to force itunes to the foreground
didn't seem to work either.
Does itunes HAVE to be foregrounded in order to send it a command key?
I also tried various variations of
tell application "iTunes"
if player state is playing then
set selection of current playlist to current track
delay 5
end if
end tell
but I just get a "iTunes got an error: Unknown object type." error
or "Can't set selection of +class cPly; to +class cFlT; id 13125 of
+class cLiP; id 7959 of +class cSrc; id 32 of application \"iTunes\"."
if I say
set selection of playlist to current track
nothing I've tried will change the selection in iTunes to the currently
playing track besides my manually pressing command-l.
--
Rid yourself of doubt --
or should you?
-George Carlin
_______________________________________________
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.