Created
November 19, 2014 23:21
-
-
Save anonymous/fa2864d0d6f8536a1ed8 to your computer and use it in GitHub Desktop.
Add to OmniFocus from Spotify
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 "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