#!/usr/bin/osascript
on run
  set info to ""
  tell application "System Events"
    set num to count (every process whose name is "iTunes")
  end tell
  if num > 0 then
    tell application "iTunes"
      if player state is playing then
        set info to artist of current track
      end if
    end tell
  end if
  return info
end run