What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » PSM changing when a media stops

PSM changing when a media stops
Author: Message:
Bhaclash
New Member
*


Posts: 3
Joined: Oct 2009
O.P. PSM changing when a media stops
Hello!

I'm tweaking mPSM to write the media info to PSM not to 'what I'm listening to'. It works fine now, but there's a small problem: when I stop the music, onEvent_MyMediaChange isn't called (at least it isn't shown in the debug tool), so I can't remove the last music info from my PSM...

eg.
Music info: artist1 - title1
My PSM looks like: personalmessage || artist1 - title1
If I skip to music : artist2 - title2, the PSM will be: personalmessage || artist2 - title2
So it's fine. But if I stop the music, my PSM remains this: personalmessage || artist2 - title2
instead of : personalmessage

Is there any way to solve this problem?

Thanks in advance,
Bhaclash


EDIT: ohh, I've found a code here, but it doesn't work.

This post was edited on 10-26-2009 at 07:58 PM by Bhaclash.
10-26-2009 07:53 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: PSM changing when a media stops
I think the script works that way because, once the music stopped playing, WLM  would revert back to displaying the personal message. In WLM 14, both can be shown at the same time meaning it would never be removed.

If I remember rightly I wrote the mPSM script based on somebody else's code for setting the media message.


I'll take a look in the morning, it's 2:45am and I've not long got back from taking my son to the hospital and I should have work tomorrow
<Eljay> "Problems encountered: shit blew up" :zippy:
10-27-2009 02:46 AM
Profile PM Find Quote Report
Bhaclash
New Member
*


Posts: 3
Joined: Oct 2009
O.P. RE: PSM changing when a media stops
Oh, I forgot to mention I'm using WLM 8.5, not the latest one (and I'm not planning to change yet). And about the code, yes, mPSM uses function setNowPlaying, which is written by -dt- if I'm not mistaken.
All I need is to recognize somehow when the media stops if it can be done... I can't figure out how to do it by myself.
10-27-2009 07:45 PM
Profile E-Mail PM Find Quote Report
Schnappi
Junior Member
**


Posts: 93
Joined: Mar 2009
RE: PSM changing when a media stops
can you write something similar for wlm 14?
10-28-2009 07:39 AM
Profile PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: PSM changing when a media stops
I'll take a look at this when I finish work (2pm GMT)



I've had a look, and I can't reproduce it.  What I have done, however, is to add an extra line of code that should disable the media PSM when it thinks it's stopped. Try it out and let me know if it works :p

http://spunkylm.co.uk/files/mPSM.plsc

It may download as a zip file... Just rename it to a plsc

This post was edited on 10-28-2009 at 02:44 PM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
10-28-2009 02:43 PM
Profile PM Find Quote Report
Bhaclash
New Member
*


Posts: 3
Joined: Oct 2009
O.P. RE: PSM changing when a media stops
Okay, I managed to solve the problem with the help of your script :)
My onEvent_MyMediaChange function looks like this:
code:
function OnEvent_MyMediaChange(NewMedia){
    var tmp = NewMedia;
    try{
        tmp=tmp.split("\\0");
        tmp[3]=tmp[3].replace(prefix,"");
        tmp[3]=tmp[3].replace(suffix,"");
        tmp[3]=prefix+" "+tmp[3]+" "+suffix;
        tmp[3]=tmp[3].replace(/\s\s/g," ");
        Messenger.MyPersonalMessage=prefix+" || "+tmp[4]+" - "+tmp[5]+ " || "+suffix;
        setNowPlaying(false,icon,tmp[3],tmp[4],tmp[5],tmp[6],tmp[7]);
    }catch(e){
        if(e.number!="-2146823281"){
            Debug.Trace("HANDLED: error "+e.number);
            Debug.Trace("Please report any bugs to the Author at:");
            Debug.Trace("http://shoutbox.menthix.net/forumdisplay.php?fid=39");
        }else{
            Debug.Trace("HANDLED: Array element tmp[3] does not exist. This is most likely the way the file information has been completed");
            Messenger.MyPersonalMessage=prefix+" "+suffix;
        }
    }
}


I've only changed the underlined parts.
Thank you, Spunky, for your help and the whole mPSM script ;)

-------------------------------------------------------------------------------

I was a bit quick to say it's working...:/ Now at first it displays the PSM correctly, then it removes the song's title from the PSM...
Somehow the else branch is always triggered... Why could it be?

This post was edited on 10-31-2009 at 11:47 AM by Bhaclash.
10-31-2009 12:53 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On