iTunes keyboard shortcut service only works when in focus I have created an Applescript that will favorite the current track. I saved it as a service, and gave it a shortcut.

on run {input, parameters}

    tell application "iTunes"
        set loved of current track to true
    end tell

    return input
end run




However, it only works when the iTunes window is in focus. If I press the shortcut when iTunes is not the window in focus, I don't even see the Services gear appear in the system tray, indicating that the script is not running. 

How do I make the script run regardless of what window has focus?
It was a set up as a service that takes no input and runs in any application.

But that wasn't the problem. Indeed, @Tetsujin seems to be correct. It was a conflict with a keyboard shortcut in the application that had keyboard focus. I used a different shortcut and it works.