For quite some time Mac users where searching for a way to paste the currently playing song from iTunes in chat messages etc. I never thought about it much but recently a friend of mine, who was a former AMIP user on Windows, needed a similar functionality under OS X. Together we constructed a working solution.

So here it is the AMIP alternative for Mac:

    • Open Automator and start a new “Service”
    • Choose “no input” for “Service receives”
    • Drag the “Run AppleScript” Action into the workflow
    • Paste in the following and edit the output in (green) to your hearts desire
on run
 try
 tell application "iTunes"
 set songTitle to the name of the current track
 set songArtist to the artist of the current track
 set songAlbum to the album of the current track
 set songYear to the year of the current track
 set the clipboard to "np:" & the songArtist & " - " & songTitle & " \"" & songAlbum & ", " & songYear & "\""
 end tell
 end try
 try
 set the clipboard to Unicode text of (the clipboard as record)
 on error errMsg
 display dialog errMsg
 end try
 tell application "System Events"
 key code 9 using {command down}
 end tell
end run
  • Save the service. I named mine “music” (creative isn’t it? 🙂 )
  • Now your able to run the service from every application’s menu under “Services”. Be sure to have your cursor in a text field because the service will immediately paste in the constructed string.
  • If you’re in a super nerdy mood today, you can also give your service a keyboard shortcut.
    Go to “System Preferences”, open “Keyboard”, go to “Keyboard Shortcuts” and set your desired Hotkey. (mine’s CMD + SHIFT + M)

I’d be happy to see further improvements, thoughts & ideas about this solutions in the comments!

 

And to all my Austrian friends: Frohen Faschingsdienstag (not that I’d care!)