Created
August 16, 2012 10:58
-
-
Save itsdamslife/3369279 to your computer and use it in GitHub Desktop.
Add selected track into a playlist and start playing the playlist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "iTunes" | |
duplicate selection to playlist "iTunes DJ" | |
if player state is playing then | |
if current playlist is not "iTunes DJ" then | |
play playlist "iTunes DJ" | |
else if current playlist is "iTunes DJ" then | |
if player state is playing then | |
print playing | |
else if player state is not playing then | |
play playlist "iTunes DJ" | |
end if | |
end if | |
else | |
play playlist "iTunes DJ" | |
end if | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment