Skip to content

Instantly share code, notes, and snippets.

Created November 19, 2014 23:21
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/fa2864d0d6f8536a1ed8 to your computer and use it in GitHub Desktop.
Save anonymous/fa2864d0d6f8536a1ed8 to your computer and use it in GitHub Desktop.
Add to OmniFocus from Spotify
tell application "Spotify"
set theTrack to name of the current track
set theArtist to artist of the current track
set theAlbum to album of the current track
set track_id to id of current track
set AppleScript's text item delimiters to ":"
set track_id to third text item of track_id
set AppleScript's text item delimiters to {""}
set realurl to ("spotify://track:" & track_id)
set theString to theTrack & " - " & theArtist & ": " & realurl
set actionTitle to "Listen to more " & artist of current track
tell application "OmniFocus"
tell default document
make new inbox task with properties {name:actionTitle, note:theString}
end tell
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment