SendMessage is a function inherited from ChatWnd object.
You'll have to use it this way :
code:
function OnEvent_ChatWndSendMessage(ChatWnd,Msg)
{
if (Msg == "^CurrentMedia")
{
var Message = "/me is now playing " + Messenger.CurrentMedia;
ChatWnd.SendMessage(Message);
}