Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save swbuehler/454672 to your computer and use it in GitHub Desktop.
Save swbuehler/454672 to your computer and use it in GitHub Desktop.
tell application "System Events"
tell application "iTunes"
set the clipboard to "Listening to "
if the class of the current playlist is (radio tuner playlist) then
set the clipboard to (the clipboard) & ¬
quote & the current stream title & quote & ¬
" on the " & quote & the name of the current track & quote & ¬
" stream"
else
if the podcast of the current track is true then
set the clipboard to (the clipboard) & ¬
quote & the name of the current track & quote ¬
& " from the podcast " & quote & ¬
the album of the current track & quote
else
set the clipboard to (the clipboard) & ¬
quote & the name of the current track & quote & ¬
" by " & the artist of the current track
end if
end if
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment