Create a gist now

Instantly share code, notes, and snippets.

anonymous /gist:fa2864d0d6f8536a1ed8
Created Nov 19, 2014

What would you like to do?
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