Shoutbox

[Request] Song msg send - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [Request] Song msg send (/showthread.php?tid=66048)

[Request] Song msg send by ombadboy on 09-10-2006 at 02:14 PM

I was thinkin if its possible to have a script, to send a particular message to a user thats listening to a particular song.

Like he got turned on "what am listenin to", if a particular song (which u have predefined) is played by one of your contacts, then to automatically send him a message ( predefined too )


RE: [Request] Song msg send by Shondoit on 09-10-2006 at 08:17 PM

It can certainly be made

You just check all contacts for media at startup/signin
And then check with OnEvent_ContactMediaChange if a contact changes his song to the one specified
Then just open a chatwindow with Messenger.OpenChat and send the message specified with ChatWnd.SendMessage
(Would have to check if there's not already a window open with the contact)

I'm not gonna make it though, I'm busy for my own, and also got school... Perhaps you can look into it yourself, or maybe someone else can have a look at it...

Success (y)


RE: [Request] Song msg send by Veggie on 09-10-2006 at 11:33 PM

code:
var array = new Array();
array['Blur - Tracy Jacks'] = "i like that song";

function OnEvent_ContactMediaChange(sEmail,sNewMedia){
    var sNewMedia_array = sNewMedia.split("\\0");
        for(var i in array){
            if(i == sNewMedia_array[5] + " - " + sNewMedia_array[4]){
                MsgPlus.DisplayToast("Contact is playing", i + "\n\nClick to send:\n" +array[i], null , "ToastClick", new Array(sEmail,array[i],i))
}}}

function ToastClick(pArray){
    chatwnd = Messenger.OpenChat(pArray[0]).SendMessage(pArray[1])
}
This should more or less work,
add more to the array up the top
RE: [Request] Song msg send by ombadboy on 09-11-2006 at 05:01 PM

amazing.. thnx :) works..