1

Is there anyway to make a global shortcut, via Automator or anything, so I can quickly delete currently playing song from iTunes?

I know how to delete a song from iTunes. What I want is to create a global shortcut, which means let me to use that shortcut from anywhere outside iTunes, to let me currently playing song.

It's application is that I'm doing work and I don't like the currnet song, I can delete it with that shortuct without moving to iTunes and manually selecting and deleting it.

I really appreciate any help you guys can provide.

0

1 Answer 1

1

Working AppleScript:

on deleteTrack(trackName)
    tell application "iTunes"
        set theTrack to track named trackName of playlist "Library"
        set songFile to location of theTrack
        delete theTrack
    end tell
    tell application "Finder" to delete songFile
end deleteTrack

on run
    tell application "iTunes"
        set currentSong to name of current track
    end tell

    deleteTrack(currentSong)
end run

Tested and confirmed to work on currently-playing songs without trouble.

Credit to http://guides.macrumors.com/Deleting_Songs_From_iTunes for the deletion AppleScript code.

2
  • I've added play (next track) ** in the next line after **delete theTrack to make itunes play the next music =)
    – Biguá
    Commented Jul 28, 2016 at 3:57
  • Happy to help! :)
    – user194458
    Commented Jul 28, 2016 at 3:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .