Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

applescript iTunes 12 enumerate though song

I have this script. it use to work.

Now, When I run it, song after song are displayed in iTunes top middles window (without playing it)

but they are not the one I selected :-)

After it is over, i can see that the right song are modified.

What should I change in this code.


tellapplication "iTunes"

activate

set trackList to the selection of window 1


if ((count trackList) is 0) then

display dialog "No song selected !" with icon caution buttons {"Ok"} default button 1

return

else

display dialog "I will Start !" buttons {"Ok"} default button 1 with icon 1 giving up after 5

repeat with theTrack in trackList

set lyrics of theTrack to "Instrumental only"

delay 2

next track

end repeat

display dialog "Done !" buttons {"Ok"} default button 1 with icon 1 giving up after 5

endif

stop

end tell

Posted on Feb 11, 2016 7:26 PM

Reply
Question marked as Best reply

Posted on Feb 12, 2016 7:21 AM

Hello,


To show the song in the player without playing it, the script need the play and the playpause commands, like this:


repeat with theTrack in trackList

play theTrack

playpause

set lyrics of theTrack to "Instrumental only"

delay 2

end repeat

5 replies

applescript iTunes 12 enumerate though song

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.